diff options
Diffstat (limited to 'src/editor/toolview.cpp')
| -rw-r--r-- | src/editor/toolview.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/editor/toolview.cpp b/src/editor/toolview.cpp index 6bbaa3a..3a9aa9d 100644 --- a/src/editor/toolview.cpp +++ b/src/editor/toolview.cpp @@ -164,18 +164,15 @@ void gui_editor_toolview_entclass_select_cb( void* ptr ) { I32 gui_editor_toolview_create_wallshape_dropdown( GUI_EDITOR_TOOLVIEW* view, I32 y ) { static LIST<GUI_LIST_ENTRY> shape_entries{}; if( !shape_entries.size ) { - GUI_LIST_ENTRY line{}; - line.val = EDITOR_WALLSHAPE_LINE; - strcpy( line.title, "line" ); - shape_entries.push( line ); - - GUI_LIST_ENTRY polygon{}; - polygon.val = EDITOR_WALLSHAPE_POLYGON; - strcpy( polygon.title, "polygon" ); - shape_entries.push( polygon ); + for( U32 i = 0; i < EDITOR_WALLSHAPE_MAX; ++i ) { + GUI_LIST_ENTRY entry{}; + entry.val = i; + strcpy( entry.title, EDITOR_WALLSHAPE_NAMES[i] ); + shape_entries.push( entry ); + } } - const char* shape_name = editor->tool.wallshape == EDITOR_WALLSHAPE_POLYGON ? "polygon" : "line"; + const char* shape_name = EDITOR_WALLSHAPE_NAMES[editor->tool.wallshape]; char dropdown_title[64]; sprintf( dropdown_title, "shape: %s v", shape_name ); |
