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

Function editor_tree_icon_texture

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

Source from the content-addressed store, hash-verified

4728) {
4729 for name in [
4730 "resize_nw",
4731 "resize_n",
4732 "resize_ne",
4733 "resize_w",
4734 "resize_e",
4735 "resize_sw",
4736 "resize_s",
4737 "resize_se",
4738 ] {
4739 set_panel_visible(ctx, name, visible);
4740 }
4741}
4742
4743pub fn set_panel_visible<API: ScriptAPI + ?Sized>(
4744 ctx: &mut ScriptContext<'_, API>,
4745 name: &str,
4746 visible: bool,
4747) {
4748 if let Some(id) = find_named(ctx, name) {
4749 let _ = with_node_mut!(ctx.run, UiPanel, id, |node| {
4750 node.visible = visible;
4751 node.input_enabled = visible;
4752 });
4753 }
4754}
4755
4756pub fn set_panel_display<API: ScriptAPI + ?Sized>(
4757 ctx: &mut ScriptContext<'_, API>,
4758 name: &str,
4759 visible: bool,
4760) {
4761 if let Some(id) = find_named(ctx, name) {
4762 let _ = with_node_mut!(ctx.run, UiPanel, id, |node| {
4763 node.visible = visible;
4764 node.input_enabled = false;
4765 });
4766 }
4767}
4768
4769pub fn set_ui_display<API: ScriptAPI + ?Sized>(
4770 ctx: &mut ScriptContext<'_, API>,
4771 name: &str,
4772 visible: bool,
4773) {
4774 if let Some(id) = find_named(ctx, name) {
4775 let _ = with_base_node_mut!(ctx.run, UiNode, id, |node| {
4776 node.visible = visible;
4777 node.input_enabled = visible;
4778 });
4779 }
4780}
4781

Callers 2

set_scene_tree_listFunction · 0.85
set_file_tree_listFunction · 0.85

Calls 4

findMethod · 0.80
iterMethod · 0.45
iter_mutMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected