diff options
| author | 2lag <96544487+2lag@users.noreply.github.com> | 2026-08-08 17:33:36 +0200 |
|---|---|---|
| committer | 2lag <96544487+2lag@users.noreply.github.com> | 2026-08-08 17:33:36 +0200 |
| commit | 2973df584978d9aae6f164ce0204179c8a28b3ae (patch) | |
| tree | c1b793c8e0d17aeb66c5197bc28acca84b2c98ab /src/editor/editor.h | |
| parent | e540910745aad31378452eec25aacfb3f346191a (diff) | |
console, textbox changes, some other shit
Diffstat (limited to 'src/editor/editor.h')
| -rw-r--r-- | src/editor/editor.h | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/editor/editor.h b/src/editor/editor.h index 3d27951..6d7d747 100644 --- a/src/editor/editor.h +++ b/src/editor/editor.h @@ -70,19 +70,6 @@ enum EditorObjectType_t { EDITOR_OBJECT_ENTITY = 1 }; -typedef void( *EDITOR_CONTEXTMENU_CALLBACK )( void* data ); -struct EDITOR_CONTEXTMENU_ITEM; -typedef U8( *EDITOR_CONTEXTMENU_ENABLED_CALLBACK )( EDITOR_CONTEXTMENU_ITEM* item ); - -struct EDITOR_CONTEXTMENU_ITEM { - char text[64]{}; - void* data{}; - EDITOR_CONTEXTMENU_CALLBACK cb{}; - EDITOR_CONTEXTMENU_ENABLED_CALLBACK enabled_cb{}; - U8 enabled{1}; - LIST<EDITOR_CONTEXTMENU_ITEM> items{}; -}; - struct GAME_EDITOR; typedef void( *EDITOR_GRID_DEP_CALLBACK )( GAME_EDITOR* e ); @@ -184,7 +171,7 @@ struct GAME_EDITOR { I32 view_mode{}; I32 view2d_type{}; - struct GUI_EDITOR_CONTEXTMENU* contextmenu{}; + struct GUI_CONTEXTMENU* contextmenu{}; GUI_BASE* header_toolbar{}; GUI_LABEL* header_viewtype_label{}; GUI_BUTTON* header_back{}; @@ -271,17 +258,6 @@ extern void editor_undo_record_change_prop( GAME_EDITOR* e, FNV1A hash, void* ol extern U8 editor_undo( GAME_EDITOR* e ); extern U8 editor_redo( GAME_EDITOR* e ); -extern void editor_show_contextmenu( I32 x, I32 y, LIST<EDITOR_CONTEXTMENU_ITEM>* items, const char* title = 0 ); -extern void editor_hide_contextmenu(); -extern U8 editor_contextmenu_open(); -extern void editor_contextmenu_set_item( - EDITOR_CONTEXTMENU_ITEM* item, - const char* text, - EDITOR_CONTEXTMENU_CALLBACK cb = 0, - void* data = 0, - EDITOR_CONTEXTMENU_ENABLED_CALLBACK enabled_cb = 0 -); - struct GUI_EDITORWINDOW : GUI_WINDOW {}; struct GUI_EDITOR_3DVIEW : GUI_VIEW { U8 heldoutbounds; @@ -374,19 +350,11 @@ struct GUI_EDITOR_VIEWTYPE_SEGMENT : GUI_BASE { I32 held_seg{-1}; }; -struct GUI_EDITOR_CONTEXTMENU : GUI_BASE { - LIST<EDITOR_CONTEXTMENU_ITEM>* items{}; - U8 initheld{1}; - U8 held{}; - I32 held_idx{-1}; - char title[64]{}; -}; - struct GUI_EDITOR_TOOLBAR : GUI_BASE { U8 held{}; I32 held_root{-1}; I32 active_root{-1}; - LIST<EDITOR_CONTEXTMENU_ITEM> entries{}; + LIST<GUI_CONTEXTMENU_ITEM> entries{}; }; extern GUI_EDITORWINDOW* gui_editorwindow( I32 w, I32 h ); |
