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

Function set_ui_node_size

perro_editor/res/scripts/ui/editor_ui.rs:4238–4248  ·  view source on GitHub ↗
(
    ctx: &mut ScriptContext<'_, API>,
    name: &str,
    size: (f32, f32),
)

Source from the content-addressed store, hash-verified

4236 }).unwrap_or_default();
4237 if focused {
4238 return;
4239 }
4240 if let Some(id) = find_named(ctx, name) {
4241 let text = text.to_string();
4242 let _ = with_node_mut!(ctx.run, UiTextBox, id, |node| {
4243 if node.text.as_ref() != text {
4244 node.set_text(text);
4245 }
4246 });
4247 }
4248}
4249
4250pub fn read_text_box<API: ScriptAPI + ?Sized>(
4251 ctx: &mut ScriptContext<'_, API>,

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected