From a266df321b19558764565f3b433aa997004a5f42 Mon Sep 17 00:00:00 2001 From: aura Date: Thu, 13 Aug 2026 00:51:36 +0200 Subject: path drawing more work --- src/editor/toolview.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/editor/toolview.cpp') 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 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 ); -- cgit v1.2.3