diff options
Diffstat (limited to 'src/editor/editor.h')
| -rw-r--r-- | src/editor/editor.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/editor/editor.h b/src/editor/editor.h index ad43705..b000816 100644 --- a/src/editor/editor.h +++ b/src/editor/editor.h @@ -41,6 +41,34 @@ enum EditorUndoType_t { EDITOR_UNDO_CREATE_POLY = 2 }; +enum EditorInfoBoxType_t { + EDITOR_INFOBOX_ASSETS = 1, + EDITOR_INFOBOX_STATUS = 2 +}; + +enum EditorViewMode_t { + EDITOR_VIEWMODE_2D = 0, + EDITOR_VIEWMODE_3D = 1, + EDITOR_VIEWMODE_SIM = 2 +}; + +enum Editor2DViewType_t { + EDITOR_2DVIEW_TOP_DOWN = 0, + EDITOR_2DVIEW_SIDE_ELEVATION = 1, + EDITOR_2DVIEW_FRONT_ELEVATION = 2 +}; + +enum EditorToolbarHit_t { + EDITOR_TOOLBAR_HIT_NONE = -1, + EDITOR_TOOLBAR_HIT_FILE = 0, + EDITOR_TOOLBAR_HIT_EDIT = 1, + EDITOR_TOOLBAR_HIT_VIEW = 2, + EDITOR_TOOLBAR_HIT_TOOLS = 3, + EDITOR_TOOLBAR_HIT_SAVE = 4, + EDITOR_TOOLBAR_HIT_UNDO = 5, + EDITOR_TOOLBAR_HIT_REDO = 6 +}; + struct GAME_EDITOR; typedef void( *EDITOR_GRID_DEP_CALLBACK )( GAME_EDITOR* e ); @@ -122,6 +150,33 @@ struct GAME_EDITOR { LIST<EDITOR_UNDO_ACTION> redo_actions{}; }; +struct EDITOR_LAYOUT { + I32 left_x; + I32 left_w; + I32 right_x; + I32 right_w; + I32 top_y; + I32 props_y; + I32 props_h; + I32 assets_y; + I32 assets_h; + I32 view_y; + I32 view_h; + I32 tool_y; + I32 tool_h; + I32 tool_btn_x; + I32 tool_btn_y; + I32 tool_btn_w; + I32 tool_btn_step; + I32 tool_panel_x; + I32 tool_panel_w; + I32 tool_panel_h; + I32 status_x; + I32 status_y; + I32 status_w; + I32 status_h; +}; + extern GAME_EDITOR* editor_create( struct GAME_DATA* game ); extern void editor_destroy( GAME_EDITOR* editor ); extern STAT editor_load_map( GAME_EDITOR* e, const char* mapname ); @@ -214,6 +269,23 @@ struct GUI_EDITOR_TEXTUREPICKER : GUI_WINDOW { GUI_CALLBACK cb; }; + +struct GUI_EDITOR_INFOBOX : GUI_VIEW { + U8 type{}; +}; + +struct GUI_EDITOR_VIEWTYPE_SEGMENT : GUI_BASE { + U8 held{}; + I32 held_seg{-1}; +}; + +struct GUI_EDITOR_TOOLBAR : GUI_BASE { + U8 held{}; + I32 held_item{-1}; + U8 file_open{}; + U8 edit_open{}; +}; + extern GUI_EDITORWINDOW* gui_editorwindow( I32 w, I32 h ); extern GUI_EDITOR_2DVIEW* gui_editor_2dview( I32 x, I32 y, I32 w, I32 h ); extern GUI_EDITOR_3DVIEW* gui_editor_3dview( I32 x, I32 y, I32 w, I32 h ); |
