From e23b36169cfbf393cfecc7d19257e338a915a232 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 9 Apr 2024 23:44:47 +0200 Subject: [PATCH 1/1] fixed updating color box when changing BD engine color in level editor --- src/editor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/editor.c b/src/editor.c index 798fc2bb..cea40951 100644 --- a/src/editor.c +++ b/src/editor.c @@ -11470,7 +11470,7 @@ static void SetRandomLevelColors_BD(void) level.bd_color_5 = cave->color5; } -static void DrawColorBox(int nr) +static void DrawColorBox_BD(int nr) { int id = ED_SELECTBOX_ID_COLORS_FIRST + nr; struct GadgetInfo *gi = level_editor_gadget[selectbox_info[id].gadget_id]; @@ -11550,7 +11550,7 @@ static void DrawEngineConfigColors(void) } for (i = 0; i < MAX_BD_COLORS; i++) - DrawColorBox(i); + DrawColorBox_BD(i); MapTextbuttonGadget(ED_TEXTBUTTON_ID_BD_SET_RANDOM_COLORS); } @@ -16369,6 +16369,8 @@ static void HandleTextInputGadgets(struct GadgetInfo *gi) int pos = type_id - ED_TEXTINPUT_ID_COLORS_FIRST; *bd_color[pos] = gd_color_get_from_string(bd_color_text[pos]); + + DrawColorBox_BD(pos); } // do not mark level as modified for certain non-level-changing gadgets @@ -16467,6 +16469,8 @@ static void HandleSelectboxGadgets(struct GadgetInfo *gi) int pos = type_id - ED_SELECTBOX_ID_COLORS_FIRST; *bd_color[pos] = gd_c64_color(bd_color_c64[pos]); + + DrawColorBox_BD(pos); } // do not mark level as modified for certain non-level-changing gadgets -- 2.34.1