From d0e4766613f1c5b5685900eb4376ff73bf8581d3 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 26 Apr 2024 12:15:17 +0200 Subject: [PATCH] changed showing standard element properties for some engines in editor --- src/editor.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/editor.c b/src/editor.c index b3304f7b..f21d086e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -11983,33 +11983,38 @@ static void DrawPropertiesInfo(void) ypos += 2 * MAX(font1_height, font2_height); - // ----- print standard properties of this element + // ----- print standard properties of this element (only for certain game engines) - DrawTextS(xpos, ypos, font1_nr, properties_text); + if (level.game_engine_type == GAME_ENGINE_TYPE_RND || + level.game_engine_type == GAME_ENGINE_TYPE_EM || + level.game_engine_type == GAME_ENGINE_TYPE_SP) + { + DrawTextS(xpos, ypos, font1_nr, properties_text); - ypos += line1_height; + ypos += line1_height; - for (i = 0; properties[i].value != -1; i++) - { - if (!HAS_PROPERTY(properties_element, properties[i].value)) - continue; + for (i = 0; properties[i].value != -1; i++) + { + if (!HAS_PROPERTY(properties_element, properties[i].value)) + continue; - DrawTextS(xpos, ypos, font2_nr, properties[i].text); + DrawTextS(xpos, ypos, font2_nr, properties[i].text); - ypos += font2_height; + ypos += font2_height; - num_standard_properties++; - } + num_standard_properties++; + } - if (num_standard_properties == 0) - { - DrawTextS(xpos + properties_text_len, ypos - line1_height + font2_yoffset, - font2_nr, none_text); + if (num_standard_properties == 0) + { + DrawTextS(xpos + properties_text_len, ypos - line1_height + font2_yoffset, + font2_nr, none_text); - ypos -= (line1_height - font1_height); - } + ypos -= (line1_height - font1_height); + } - ypos += MAX(font1_height, font2_height); + ypos += MAX(font1_height, font2_height); + } // ----- print special description of this element -- 2.34.1