From f36c1661d8f2d7e15b9d954ebacd0868fff9213c Mon Sep 17 00:00:00 2001 From: ac-stef Date: Fri, 5 Aug 2016 01:42:02 +0200 Subject: [PATCH] less ugly screenshot type slider code also: persistent --- config/menus_settings.cfg | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 4303eef4..27e30788 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -443,12 +443,20 @@ menuitem [Weapon settings...] [ showmenu [Weapo menuitem [Edit kill messages...] [ showmenu [Kill Messages] ] menuitem [Bot settings...] [ showmenu [Bot settings] ] -tempalias __screenshottype 0 alias askquit 1 alias showmenuonstartup 1 alias menufilesort_cgz 0 alias menufilesort_dmo 0 +tempalias __screenshottypes ["JPEG (Terrible Quality)" "JPEG (Bad Quality)" "JPEG (Good Quality)" "JPEG (Best Quality)" "PNG (Lossless)" "BMP (Lossless)"] +tempalias __getscreenshottype [ + tempalias __screenshottype (at "5 0 4" $screenshottype) // 0:BMP 1:JPG 2:PNG + if (= $screenshottype 1) [ + looplist [50 70 85] q [ if (< $q $jpegquality) [ += __screenshottype 1 ] ] + ] + result $__screenshottype +] + newmenu Misc menuitemcheckbox [Auto map download: ] "$autogetmap" [ autogetmap $arg1 ] menuitem [Configure auto media download --> ] [ showmenu "Autodownload config"] @@ -459,7 +467,7 @@ menuitemcheckbox [Auto-screenshot: ] "$autoscreenshot" [ autoscree menuitemcheckbox [Allow HUD echos: ] "$allowhudechos" [ allowhudechos $arg1 ] menuitemslider [Servers to ping at once: ] 0 50 "$maxservpings" 5 [] [ maxservpings $arg1 ] menuitemslider [Milliseconds between pinging servers: ] 1000 60000 "$servpingrate" 1000 [] [ servpingrate $arg1 ] -menuitemslider [Screenshot type: ] -1 4 "$__screenshottype" 1 ["JPEG (Terrible Quality)" "JPEG (Bad Quality)" "JPEG (Good Quality)" "JPEG (Best Quality)" "PNG (Lossless)" "BMP (Lossless)"] [ if (= $arg1 -1) [ screenshottype 1; jpegquality 50; __screenshottype = -1 ] [ if (= $arg1 0) [ screenshottype 1; jpegquality 70; __screenshottype = 0 ] [ if (= $arg1 1) [ screenshottype 1; jpegquality 85; __screenshottype = 1 ] [ if (= $arg1 2) [ screenshottype 1; jpegquality 100; __screenshottype = 2 ] [ if (= $arg1 3) [ screenshottype 2; __screenshottype = 3 ] [ if (= $arg1 4) [ screenshottype 0; __screenshottype = 4 ] ] ] ] ] ] ] +menuitemslider [Screenshot type: ] 0 5 __getscreenshottype 1 $__screenshottypes [ screenshottype (at "1 1 1 1 2 0" $arg1) ; if (< $arg1 4) [ jpegquality (at [50 70 85 100] $arg1) ] ] menuitemslider [Console size: ] 0 20 "$consize" 1 [] [ consize $arg1 ] menuitemslider [Font type: ] 0 2 "$__fontsetting" 1 [Default Serif Monospace] [ if (= $arg1 1) [ setfont serif ] [ if (= $arg1 2) [ setfont mono ] [ setfont default ] ] ] menuitemslider [Mini-map background style: ] 0 2 "$showmapbackdrop" 1 ["Fully Transparent" Black White/Transparent] [ showmapbackdrop $arg1 ]