From: Holger Schemel Date: Wed, 25 Jan 2017 23:26:50 +0000 (+0100) Subject: added request dialog before using level template (currently always asking) X-Git-Tag: 4.0.0.2~25 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a3ea1329b254d1918dcf2fb0587516c68523cf02;p=rocksndiamonds.git added request dialog before using level template (currently always asking) --- diff --git a/src/editor.c b/src/editor.c index 507f9c3b..48e6feb0 100644 --- a/src/editor.c +++ b/src/editor.c @@ -11513,6 +11513,16 @@ static void HandleCheckbuttons(struct GadgetInfo *gi) return; } + if (level.use_custom_template && + !Request("Discard changes and use level template?", REQ_ASK)) + { + level.use_custom_template = FALSE; + + ModifyGadget(gi, GDI_CHECKED, FALSE, GDI_END); + + return; + } + LoadLevelTemplate(level.use_custom_template ? -1 : level_nr); DrawEditModeWindow();