(ctx: &mut ScriptContext<'_, API>, dir: isize)
| 1116 | pub 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 | |
| 1128 | pub 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(); |
no test coverage detected