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

Function set_ui_display

perro_editor/res/scripts/ui/editor_ui.rs:4225–4236  ·  view source on GitHub ↗
(
    ctx: &mut ScriptContext<'_, API>,
    name: &str,
    visible: bool,
)

Source from the content-addressed store, hash-verified

4223 node.text_size_ratio = 0.36;
4224 node.color = Color::from_hex(theme::TEXT).unwrap_or(node.color);
4225 node.visible = false;
4226 node.input_enabled = false;
4227 });
4228}
4229
4230pub fn set_label<API: ScriptAPI + ?Sized>(
4231 ctx: &mut ScriptContext<'_, API>,
4232 name: &str,
4233 text: &str,
4234) {
4235 if let Some(id) = find_named(ctx, name) {
4236 let _ = with_node_mut!(ctx.run, UiLabel, id, |node| {
4237 if node.text.as_ref() != text {
4238 node.set_text(text.to_string());
4239 }

Callers 8

refresh_chrome_viewFunction · 0.85
refresh_manager_viewFunction · 0.85
refresh_tabs_viewFunction · 0.85
refresh_inspector_viewFunction · 0.85
apply_component_rowFunction · 0.85

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected