diff options
| author | aura <nw@moneybot.cc> | 2026-02-25 06:07:38 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-25 06:07:44 +0100 |
| commit | 25da8e01a0499c273357cb2feb2825b53e86795b (patch) | |
| tree | 0888d139edf274a59ab2561a655e8f5d4f0be185 /src/editor/editor.h | |
| parent | d97e17b180257f3425574eb3ba4189d312eb590a (diff) | |
wip on toolview
Diffstat (limited to 'src/editor/editor.h')
| -rw-r--r-- | src/editor/editor.h | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/editor/editor.h b/src/editor/editor.h index a4b1f1a..9063f50 100644 --- a/src/editor/editor.h +++ b/src/editor/editor.h @@ -26,6 +26,18 @@ enum EditorSelectType_t { EDITOR_SELECT_SURFPROPS }; +struct GAME_EDITOR_TOOL { + U8 type; + + /* shapes */ + U8 walls; + GL_TEX2D* tex; + + /* entity */ + U32 entclass; + void* entprops; +}; + struct GAME_EDITOR { GAME_DATA* game; @@ -38,17 +50,16 @@ struct GAME_EDITOR { struct GUI_EDITOR_2DVIEW* v2d; struct GUI_EDITOR_3DVIEW* v3d; - struct GUI_LABEL* toollabel; - struct GUI_LABEL* gridlabel; struct GUI_EDITOR_PROPVIEW* props; + struct GUI_EDITOR_TOOLVIEW* tool; I32 map_select{}; } gui; U8 wireframe{}; - U8 tool{}; + GAME_EDITOR_TOOL tool; F32 grid{}; U8 propgrid{}; F32 spritesize{}; @@ -105,6 +116,10 @@ struct GUI_EDITOR_PROPVIEW : GUI_VIEW { GUI_VIEW* itemview; }; +struct GUI_EDITOR_TOOLVIEW : GUI_VIEW { + GUI_VIEW* itemview; +}; + struct GUI_EDITOR_TEXTUREPICKER : GUI_WINDOW { struct GL_TEX2D** target; struct GL_TEX2D* curselect; @@ -127,13 +142,15 @@ struct GUI_EDITOR_TEXTUREPICKER : GUI_WINDOW { GUI_CALLBACK cb; }; -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 ); -extern GUI_EDITOR_PROPVIEW* gui_editor_propview( I32 x, I32 y, I32 w, I32 h ); +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 ); +extern GUI_EDITOR_PROPVIEW* gui_editor_propview( I32 x, I32 y, I32 w, I32 h ); +extern void gui_editor_propview_select( GUI_EDITOR_PROPVIEW* e, void* what, U8 seltype ); +extern void gui_editor_propview_update( GUI_EDITOR_PROPVIEW* e ); +extern GUI_EDITOR_TOOLVIEW* gui_editor_toolview( I32 x, I32 y, I32 w, I32 h ); +extern void gui_editor_toolview_update( GUI_EDITOR_TOOLVIEW* view ); extern GUI_EDITOR_TEXTUREPICKER* gui_editor_texturepicker( I32 x, I32 y, I32 w, I32 h, GL_TEX2D** target ); -extern void gui_editor_propview_select( GUI_EDITOR_PROPVIEW* e, void* what, U8 seltype ); -extern void gui_editor_propview_update( GUI_EDITOR_PROPVIEW* e ); extern GAME_EDITOR* editor; |
