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

Function nudge_node_picker

perro_editor/res/scripts/scene/editor_nodes.rs:1118–1130  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>, dir: isize)

Source from the content-addressed store, hash-verified

1116pub fn update_node_picker_filter<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>) {
1117 let Some(text) = read_text_box(ctx, "add_node_search_box") else {
1118 return;
1119 };
1120 let _ = with_state_mut!(ctx.run, EditorState, ctx.id, |state| {
1121 state.node_picker_filter = text;
1122 state.node_picker_offset = 0;
1123 state.focused_inspector_box = "add_node_search_box".to_string();
1124 });
1125 refresh_all(ctx);
1126}
1127
1128pub fn set_node_picker_filter_text<API: ScriptAPI + ?Sized>(
1129 ctx: &mut ScriptContext<'_, API>,
1130 text: &str,
1131) {
1132 let _ = with_state_mut!(ctx.run, EditorState, ctx.id, |state| {
1133 state.node_picker_filter = text.to_string();

Callers 1

update_editor_shortcutsFunction · 0.85

Calls 1

refresh_allFunction · 0.85

Tested by

no test coverage detected