Ticket #3172: gui-volume-tab.patch

File gui-volume-tab.patch, 5.5 KB (added by fingolfin, 17 years ago)
  • gui/themes/modern.ini

     
    223223Console.rightPadding=5
    224224Console.topPadding=5
    225225Console.bottomPadding=5
    226 TabWidget.tabWidth=85
     226TabWidget.tabWidth=75
    227227TabWidget.tabHeight=27
    228228TabWidget.titleVPad=8
    229229TabWidget.navButtonRightPad=3
     
    359359gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
    360360opYoffset=(opYoffset + buttonHeight + 6)
    361361useWithPrefix=audioControls gameoptions_
    362 useWithPrefix=volumeControls gameoptions_
    363362useWithPrefix=subtitleControls gameoptions_
    364363
     364# volume tab
     365opYoffset=vBorder
     366gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
     367opYoffset=(opYoffset + buttonHeight + 6)
     368useWithPrefix=volumeControls gameoptions_
     369
    365370# midi tab
    366371opYoffset=vBorder
    367372gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight
     
    566571pix_checkbox_empty="checkbox_empty320.bmp"
    567572pix_checkbox_checked="checkbox_checked320.bmp"
    568573pix_cursor_image="cursor320.bmp"
    569 def_volumeControlsInAudio=false
    570574
    571575# NES resoltuion
    572576[256x240]
     
    582586def_insetH=(h - 13 - insetY)
    583587def_launcherVersionX=50
    584588def_launcherVersionY=5
    585 def_volumeControlsInAudio=false
    586589def_midiControlsSpacing=2
    587590def_gameOptionsOverrideVPad=10
    588591def_aboutXOff=3
  • gui/themes/classic080.ini

     
    193193gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
    194194opYoffset=(opYoffset + buttonHeight)
    195195useWithPrefix=audioControls gameoptions_
    196 useWithPrefix=volumeControls gameoptions_
    197196useWithPrefix=subtitleControls gameoptions_
    198197
     198# volume tab
     199opYoffset=vBorder
     200gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 190) buttonHeight
     201opYoffset=(opYoffset + buttonHeight)
     202useWithPrefix=volumeControls gameoptions_
     203
    199204# midi tab
    200205opYoffset=vBorder
    201206gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight
     
    430435scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
    431436scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h
    432437scummsaveload_extinfo.visible=false
    433 def_volumeControlsInAudio=false
    434438
    435439# MM NES resolution
    436440[256x240]
     
    446450def_insetH=(h - 13 - insetY)
    447451def_launcherVersionX=50
    448452def_launcherVersionY=5
    449 def_volumeControlsInAudio=false
    450453def_midiControlsSpacing=2
    451454def_gameOptionsOverrideVPad=10
    452455def_aboutXOff=3
  • gui/launcher.cpp

     
    228228        //
    229229        // 5) The volume tab
    230230        //
    231         int volControlPos = g_gui.evaluator()->getVar("volumeControlsInAudio", true);
     231        tab->addTab("Volume");
    232232
    233         if (!volControlPos) {
    234                 tab->addTab("Volume");
     233        _globalVolumeOverride = new CheckboxWidget(tab, "gameoptions_volumeCheckbox", "Override global volume settings", kCmdGlobalVolumeOverride, 0);
    235234
    236                 _globalVolumeOverride = new CheckboxWidget(tab, "gameoptions_volumeCheckbox", "Override global volume settings", kCmdGlobalVolumeOverride, 0);
    237         } else {
    238                 // FIXME/TODO: It's unfortunate that you get a more fine grained control over which settings
    239                 // are overriden and which are not when using the *smaller* resolution than with the bigger!
    240                 // I guess we should simply offer the "volume override" checkbox in the big resolution, too.
    241                 _globalVolumeOverride = NULL;
    242         }
    243 
    244235        addVolumeControls(tab, "gameoptions_");
    245236
    246237        //
     
    317308
    318309void EditGameDialog::loadConfigToWidgets() {
    319310        int sel, i;
    320         bool e, f;
     311        bool e;
    321312
    322313        OptionsDialog::loadConfigToWidgets();
    323314
     
    333324                ConfMan.hasKey("output_rate", _domain) ||
    334325                ConfMan.hasKey("subtitles", _domain) ||
    335326                ConfMan.hasKey("talkspeed", _domain);
     327        _globalAudioOverride->setState(e);
    336328
    337         f = ConfMan.hasKey("music_volume", _domain) ||
     329        e = ConfMan.hasKey("music_volume", _domain) ||
    338330                ConfMan.hasKey("sfx_volume", _domain) ||
    339331                ConfMan.hasKey("speech_volume", _domain);
     332        _globalVolumeOverride->setState(e);
    340333
    341         if (_globalVolumeOverride) {
    342                 _globalAudioOverride->setState(e);
    343                 _globalVolumeOverride->setState(f);
    344         } else {
    345                 _globalAudioOverride->setState(e || f);
    346         }
    347 
    348334        e = ConfMan.hasKey("soundfont", _domain) ||
    349335                ConfMan.hasKey("multi_midi", _domain) ||
    350336                ConfMan.hasKey("native_mt32", _domain) ||
  • gui/theme-config.cpp

     
    274274"gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight\n"
    275275"opYoffset=(opYoffset + buttonHeight)\n"
    276276"useWithPrefix=audioControls gameoptions_\n"
    277 "useWithPrefix=volumeControls gameoptions_\n"
    278277"useWithPrefix=subtitleControls gameoptions_\n"
    279278"\n"
     279"# volume tab\n"
     280"opYoffset=vBorder\n"
     281"gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 190) buttonHeight\n"
     282"opYoffset=(opYoffset + buttonHeight)\n"
     283"useWithPrefix=volumeControls gameoptions_\n"
     284"\n"
    280285"# midi tab\n"
    281286"opYoffset=vBorder\n"
    282287"gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight\n"
     
    480485"def_insetH=(h - 13 - insetY)\n"
    481486"def_launcherVersionX=50\n"
    482487"def_launcherVersionY=5\n"
    483 "def_volumeControlsInAudio=false\n"
    484488"def_midiControlsSpacing=2\n"
    485489"def_gameOptionsOverrideVPad=10\n"
    486490"def_aboutXOff=3\n"