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

Function viewport_window_aspect

perro_editor/res/scripts/ui/editor_ui.rs:4476–4479  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>)

Source from the content-addressed store, hash-verified

4474 name: &str,
4475) {
4476 if let Some(id) = find_named(ctx, name) {
4477 let _ = with_node_mut!(ctx.run, UiLabel, id, |node| {
4478 // Axis letter sits inside the left edge of its box, Godot-style.
4479 node.layout.anchor = UiAnchor::Left;
4480 node.layout.size = UiVector2::ratio(0.28, 1.0);
4481 node.layout.z_index = 10;
4482 node.transform.translation = Vector2::ZERO;

Callers 5

apply_viewport_modeFunction · 0.85
apply_viewport_canvasFunction · 0.85

Calls 2

viewport_sizeMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected