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

Function set_inspector_picker

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

Source from the content-addressed store, hash-verified

4871 let _ = with_node_mut!(ctx.run, UiCameraStream, id, |node| {
4872 node.visible = visible;
4873 node.input_enabled = visible;
4874 });
4875 }
4876}
4877
4878pub fn set_viewport_stream_camera<API: ScriptAPI + ?Sized>(
4879 ctx: &mut ScriptContext<'_, API>,
4880 name: &str,
4881 camera: NodeID,
4882) {
4883 if let Some(id) = find_named(ctx, name) {
4884 let _ = with_node_mut!(ctx.run, UiCameraStream, id, |node| {
4885 node.stream.camera = camera;
4886 });
4887 }
4888}
4889
4890pub fn set_panel_size<API: ScriptAPI + ?Sized>(
4891 ctx: &mut ScriptContext<'_, API>,
4892 name: &str,
4893 size: (f32, f32),
4894) {
4895 if let Some(id) = find_named(ctx, name) {
4896 let _ = with_node_mut!(ctx.run, UiPanel, id, |node| {
4897 node.layout.size = UiVector2::ratio(size.0, size.1);
4898 });
4899 }
4900}
4901
4902const CANVAS_V_LINES: [&str; 9] = [
4903 "canvas_v_0", "canvas_v_1", "canvas_v_2", "canvas_v_3", "canvas_v_4", "canvas_v_5",
4904 "canvas_v_6", "canvas_v_7", "canvas_v_8",
4905];
4906const CANVAS_H_LINES: [&str; 9] = [
4907 "canvas_h_0", "canvas_h_1", "canvas_h_2", "canvas_h_3", "canvas_h_4", "canvas_h_5",

Callers 3

handle_editor_escapeFunction · 0.85

Calls 2

find_namedFunction · 0.85
set_logFunction · 0.85

Tested by

no test coverage detected