From: Brendan Hansen Date: Fri, 8 Oct 2021 17:42:34 +0000 (-0500) Subject: added editor.Hide X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=6dad48d8cef4c03dc56d2fa6ef658a9f6b20d236;p=onyx-wasm-analyzer.git added editor.Hide --- diff --git a/src/app/app.onyx b/src/app/app.onyx index 01e9740..eb4640c 100644 --- a/src/app/app.onyx +++ b/src/app/app.onyx @@ -435,7 +435,7 @@ invoke_feature_function :: macro (name: str, Hook_Type := #type () -> void, call if type.kind != .Struct do continue; feature := cast(^Type_Info_Struct) type; - + for ^tag: feature.tags { if tag.type == Feature { debug_log(.Debug, "Found feature: {}", (cast(^Feature) tag.data).name); diff --git a/src/app/editor.onyx b/src/app/editor.onyx index b7533c5..1d86b61 100644 --- a/src/app/editor.onyx +++ b/src/app/editor.onyx @@ -7,6 +7,7 @@ package editor use package core } +Hide :: struct {} Rename :: struct { name: str; } Slider_Int :: struct { min, max: i32; } Slider_Float :: struct { min, max: f32; } @@ -68,6 +69,12 @@ editor_window_draw :: (obj: any, win: ^app.Application_Window, site := #callsite for ^member: settings_type.members { __counter += 1; + + if array.some(member.tags, (x) => { + if x.type != type_expr do return false; + return *cast(^type_expr) x.data == Hide; + }) do continue; + member_type := get_type_info(member.type); row_rect, *rect = ui.Flow.split_horizontal(*rect, top_height=48); diff --git a/src/ui/window.onyx b/src/ui/window.onyx index 39d028b..2b99ea9 100644 --- a/src/ui/window.onyx +++ b/src/ui/window.onyx @@ -26,8 +26,8 @@ Window_State :: struct { resizable := true; should_close := false; - dragging := false; - resizing := false; + [editor.Hide] dragging := false; + [editor.Hide] resizing := false; [editor.Slider_Float.{ 0, 24 }] shadow := 10.0f;