From 7b6be5da7cb598f2da66dc6e040224dbae15811f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 5 Jan 2018 14:19:22 +0100 Subject: [PATCH] HQ/SVG shots in the editors now include the aura background, and you can choose the file (use Shift+F6 for the old way) --- mapeditor.cpp | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/mapeditor.cpp b/mapeditor.cpp index d2dee33c..92804ba2 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -603,6 +603,28 @@ namespace mapeditor { } } } + + void saveHighQualityShotX() { + static string hqfile = "hqshot.png"; + if(anyshiftclick) + saveHighQualityShot(); + else + dialog::openFileDialog(hqfile, XLAT("F6 = HQ shot"), ".png", [] () { + saveHighQualityShot(hqfile.c_str()); + return true; + }); + } + + void saveSvgShotX() { + static string hqfile = "svgshot.svg"; + if(anyshiftclick) + svg::render(); + else + dialog::openFileDialog(hqfile, XLAT("F8 = SVG shot"), ".svg", [] () { + svg::render(hqfile.c_str()); + return true; + }); + } void editAt(cellwalker where) { @@ -778,12 +800,12 @@ namespace mapeditor { }); #if CAP_SDL else if(sym == SDLK_F6) { - saveHighQualityShot(); + saveHighQualityShotX(); } #endif #if CAP_SVG else if(sym == SDLK_F8) { - svg::render(); + saveSvgShotX(); } #endif else if(sym == SDLK_F7) { @@ -1413,13 +1435,13 @@ namespace mapeditor { #if CAP_SDL if(sym == SDLK_F6) { - saveHighQualityShot(); + saveHighQualityShotX(); } #endif #if CAP_SVG if(sym == SDLK_F8) { - svg::render(); + saveSvgShotX(); } #endif