(window_aspect: f32, zoom: f32)
| 4483 | node.h_align = UiTextAlign::Center; |
| 4484 | node.v_align = UiTextAlign::Center; |
| 4485 | node.input_enabled = false; |
| 4486 | node.mouse_filter = UiMouseFilter::Pass; |
| 4487 | }); |
| 4488 | } |
| 4489 | } |
| 4490 | |
| 4491 | pub fn set_text_box_text_ratio<API: ScriptAPI + ?Sized>( |
| 4492 | ctx: &mut ScriptContext<'_, API>, |
| 4493 | name: &str, |
| 4494 | ratio: f32, |
| 4495 | ) { |
| 4496 | if let Some(id) = find_named(ctx, name) { |
| 4497 | let _ = with_node_mut!(ctx.run, UiTextBox, id, |node| { |
| 4498 | node.text_size_ratio = ratio; |
| 4499 | }); |
| 4500 | } |
| 4501 | } |
| 4502 |
no test coverage detected