MCPcopy Create free account
hub / github.com/PerroEngine/Perro / ui_canvas_size_ratio

Function ui_canvas_size_ratio

perro_editor/res/scripts/ui/editor_ui.rs:4485–4499  ·  view source on GitHub ↗
(window_aspect: f32, zoom: f32)

Source from the content-addressed store, hash-verified

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
4491pub 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

Callers 3

apply_viewport_canvasFunction · 0.85

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected