diff options
| author | navewindre <boneyaard@gmail.com> | 2025-11-28 14:41:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-28 14:41:22 +0100 |
| commit | 9c05c795d7b59c5ab94fb769f315c712b37df0cd (patch) | |
| tree | 16cccf8cbb88703de798066a06f94013f89a8a5a /src/editor/gui.cpp | |
| parent | f8b92ce3aa08b1445c9f956d8166830946562d12 (diff) | |
| parent | 3e094f20d4dda90e0356aba3f0abc4b7c7015844 (diff) | |
Merge pull request #1 from navewindre/windows-compat
Windows compat
Diffstat (limited to 'src/editor/gui.cpp')
| -rw-r--r-- | src/editor/gui.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/editor/gui.cpp b/src/editor/gui.cpp index 71ce113..1060c00 100644 --- a/src/editor/gui.cpp +++ b/src/editor/gui.cpp @@ -121,57 +121,6 @@ void editor_create_tools_row( GAME_EDITOR* e ) { editor_update_active_tool_label( e ); } -void editor_update_view_settings( GAME_EDITOR* e ) { - GAME_EDITOR::EDITOR_GUI* egui = &e->gui; - - sprintf( egui->gridlabel->name, "grid size: %1.2f", e->grid ); -} - -void editor_grid_increment_cb( void* ) { - if( editor->grid < 16.f ) editor->grid *= 2.f; - editor_update_view_settings( editor ); - - if( editor->propgrid ) - editor_update_properties_column( editor ); -} - -void editor_grid_decrement_cb( void* ) { - if( editor->grid > 0.25f ) editor->grid *= 0.5f; - editor_update_view_settings( editor ); - - if( editor->propgrid ) - editor_update_properties_column( editor ); -} - -void editor_grid_propgrid_cb( void* ) { - editor_update_properties_column( editor ); -} - -void editor_create_view_settings_row( GAME_EDITOR* e ) { - I32 x = 320, y = 426; - - gui_label( x, y, "view settings:" ); x += 95; - editor->gui.gridlabel = gui_label( x, y, "grid size: %1.2f", e->grid ); - x += 95; - gui_button( x, y, 20, 20, "+", editor_grid_increment_cb ); - gui_button( x + 25, y, 20, 20, "-", editor_grid_decrement_cb ); - x += 55; - GUI_CHECKBOX* check = gui_checkbox( x, y, "properties grid", &e->propgrid ); - check->cb = editor_grid_propgrid_cb; - x += 120; - gui_checkbox( x, y, "wireframe", &e->wireframe ); - - x = 320; - y = 440; - gui_button( x, y, 100, 20, "compile bsp", pfn( void* b ) { - if( editor->map->bsp ) - bsp_free( editor->map->bsp ); - editor->map->bsp = bsp_build_map( editor->map ); - } ); x += 110; - - gui_checkbox( x, y, "draw bsp", &e->drawbsp ); -} - void editor_create_map_view( GAME_EDITOR* e ) { if( !e->map ) { dlog( "editor_create_map_views() : no map loaded\n" ); @@ -192,7 +141,6 @@ void editor_create_map_view( GAME_EDITOR* e ) { editor_create_properties_column( e ); editor_create_game_view_column( e ); editor_create_tools_row( e ); - editor_create_view_settings_row( e ); } void close_new_map_popup( void* ) { |
