summaryrefslogtreecommitdiff
path: root/src/editor/toolview.cpp
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-08-13 00:51:36 +0200
committeraura <nw@moneybot.cc>2026-08-13 00:51:36 +0200
commita266df321b19558764565f3b433aa997004a5f42 (patch)
tree9d4dd1b4a6a4c21348fe222e28e21a858561b8ee /src/editor/toolview.cpp
parent17c07b5f884453130d8be3a6d91d730d80d4f8ae (diff)
path drawing more workHEADmaster
Diffstat (limited to 'src/editor/toolview.cpp')
-rw-r--r--src/editor/toolview.cpp17
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 );