diff options
author | Eugene Sandulenko | 2006-03-09 05:18:00 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-03-09 05:18:00 +0000 |
commit | 8a5f44d797230d3a72697df6d1ee785a04b01d0e (patch) | |
tree | 1c131a5bb7397e530c9ea10a091bdc88144aa4cd | |
parent | effed85448baa683ed5dafe2cf2c5531c092a951 (diff) | |
download | scummvm-rg350-8a5f44d797230d3a72697df6d1ee785a04b01d0e.tar.gz scummvm-rg350-8a5f44d797230d3a72697df6d1ee785a04b01d0e.tar.bz2 scummvm-rg350-8a5f44d797230d3a72697df6d1ee785a04b01d0e.zip |
Converted last dialogs to new scheme. Now it seems to be everything. Please,
test throghoutly.
svn-id: r21157
-rw-r--r-- | engines/scumm/dialogs.cpp | 2 | ||||
-rw-r--r-- | gui/EditTextWidget.cpp | 8 | ||||
-rw-r--r-- | gui/EditTextWidget.h | 1 | ||||
-rw-r--r-- | gui/about.cpp | 14 | ||||
-rw-r--r-- | gui/browser.cpp | 38 | ||||
-rw-r--r-- | gui/chooser.cpp | 41 | ||||
-rw-r--r-- | gui/chooser.h | 2 | ||||
-rw-r--r-- | gui/console.cpp | 2 | ||||
-rw-r--r-- | gui/dialog.cpp | 34 | ||||
-rw-r--r-- | gui/dialog.h | 3 | ||||
-rw-r--r-- | gui/launcher.cpp | 92 | ||||
-rw-r--r-- | gui/options.cpp | 32 | ||||
-rw-r--r-- | gui/options.h | 2 | ||||
-rw-r--r-- | gui/theme-config.cpp | 118 | ||||
-rw-r--r-- | gui/themes/default-theme.ini | 118 |
15 files changed, 257 insertions, 250 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index eb9daf7e7e..3f243768b8 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -286,7 +286,7 @@ public: }; SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) - : GUI::ChooserDialog(title, buttonLabel, 182), _saveMode(saveMode) { + : GUI::ChooserDialog(title, "scummsaveload_", buttonLabel), _saveMode(saveMode) { _list->setEditable(saveMode); _list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero); diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp index 5c3b51fd14..de54e46048 100644 --- a/gui/EditTextWidget.cpp +++ b/gui/EditTextWidget.cpp @@ -34,6 +34,14 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons setEditString(text); } +EditTextWidget::EditTextWidget(GuiObject *boss, String name, const String &text) + : EditableWidget(boss, name) { + _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE; + _type = kEditTextWidget; + + setEditString(text); +} + void EditTextWidget::setEditString(const String &str) { EditableWidget::setEditString(str); _backupString = str; diff --git a/gui/EditTextWidget.h b/gui/EditTextWidget.h index 2eb2389036..8dc0357282 100644 --- a/gui/EditTextWidget.h +++ b/gui/EditTextWidget.h @@ -36,6 +36,7 @@ protected: public: EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, WidgetSize ws = kNormalWidgetSize); + EditTextWidget(GuiObject *boss, String name, const String &text); void setEditString(const String &str); diff --git a/gui/about.cpp b/gui/about.cpp index b0eea4ddca..83eb4fd652 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -83,17 +83,9 @@ AboutDialog::AboutDialog() const int screenW = g_system->getOverlayWidth(); const int screenH = g_system->getOverlayHeight(); - int outerBorder; - - if (screenW >= 400 && screenH >= 300) { - xOff = 8; - yOff = 5; - outerBorder = 80; - } else { - xOff = 3; - yOff = 2; - outerBorder = 10; - } + xOff = g_gui.evaluator()->getVar("aboutXOff");; + yOff = g_gui.evaluator()->getVar("aboutYOff");; + int outerBorder = g_gui.evaluator()->getVar("aboutOuterBorder");; _w = screenW - 2 * outerBorder; _h = screenH - 2 * outerBorder; diff --git a/gui/browser.cpp b/gui/browser.cpp index d31e3b851a..61a45079d2 100644 --- a/gui/browser.cpp +++ b/gui/browser.cpp @@ -41,7 +41,7 @@ enum { */ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser) - : Dialog(20, 10, 320 -2 * 20, 200 - 2 * 10) { + : Dialog("browser") { _titleRef = CFStringCreateWithCString(0, title, CFStringGetSystemEncoding()); _isDirBrowser = dirBrowser; } @@ -131,49 +131,27 @@ int BrowserDialog::runModal() { */ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser) - : Dialog(0, 0, 320, 200) { - - const int screenW = g_system->getOverlayWidth(); - const int screenH = g_system->getOverlayHeight(); - - GUI::WidgetSize ws; - int buttonHeight; - int buttonWidth; - - _w = (screenW * 7) / 8; - _h = (screenH * 9) / 10; - _x = (screenW - _w) / 2; - _y = (screenH - _h) / 2; - - if (screenW >= 400 && screenH >= 300) { - ws = GUI::kBigWidgetSize; - buttonWidth = kBigButtonWidth; - buttonHeight = kBigButtonHeight; - } else { - ws = GUI::kNormalWidgetSize; - buttonWidth = kButtonWidth; - buttonHeight = kButtonHeight; - } + : Dialog("browser") { _isDirBrowser = dirBrowser; _fileList = NULL; _currentPath = NULL; // Headline - TODO: should be customizable during creation time - new StaticTextWidget(this, 10, kLineHeight, _w - 2 * 10, kLineHeight, title, kTextAlignCenter); + new StaticTextWidget(this, "browser_headline", title, kTextAlignCenter); // Current path - TODO: handle long paths ? - _currentPath = new StaticTextWidget(this, 10, 2 * kLineHeight, _w - 2 * 10, kLineHeight, "DUMMY", kTextAlignLeft); + _currentPath = new StaticTextWidget(this, "browser_path", "DUMMY", kTextAlignLeft); // Add file list - _fileList = new ListWidget(this, 10, 3 * kLineHeight, _w - 2 * 10, _h - 3 * kLineHeight - buttonHeight - 14, ws); + _fileList = new ListWidget(this, "browser_list"); _fileList->setNumberingMode(kListNumberingOff); _fileList->setEditable(false); // Buttons - addButton(this, 10, _h - buttonHeight - 8, "Go up", kGoUpCmd, 0, ws); - addButton(this, _w - 2 * (buttonWidth + 10), _h - buttonHeight - 8, "Cancel", kCloseCmd, 0, ws); - addButton(this, _w - (buttonWidth + 10), _h - buttonHeight - 8, "Choose", kChooseCmd, 0, ws); + new ButtonWidget(this, "browser_up", "Go up", kGoUpCmd, 0); + new ButtonWidget(this, "browser_cancel", "Cancel", kCloseCmd, 0); + new ButtonWidget(this, "browser_choose", "Choose", kChooseCmd, 0); } void BrowserDialog::open() { diff --git a/gui/chooser.cpp b/gui/chooser.cpp index 6687164238..3b18bf912e 100644 --- a/gui/chooser.cpp +++ b/gui/chooser.cpp @@ -31,50 +31,21 @@ enum { kChooseCmd = 'Chos' }; -ChooserDialog::ChooserDialog(const String &title, const String &buttonLabel, int height) - : Dialog(8, (200 - height) / 2, 320 - 2 * 8, height) { - - const int screenW = g_system->getOverlayWidth(); - const int screenH = g_system->getOverlayHeight(); - - GUI::WidgetSize ws; - int buttonWidth, buttonHeight; - - if (screenW >= 400 && screenH >= 300) { - ws = GUI::kBigWidgetSize; - buttonHeight = kBigButtonHeight; - buttonWidth = kBigButtonWidth; - } else { - ws = GUI::kNormalWidgetSize; - buttonHeight = kButtonHeight; - buttonWidth = kButtonWidth; - } - - // FIXME: This is an ugly hack. The 'height' parameter assumes a 200 - // pixel tall screen, so try to scale that to something sensible. - - _h = (screenH * height) / 200; - _w = screenW - 2 * 8; - - _x = (screenW - _w) / 2; - _y = (screenH - _h) / 2; - - int yoffset = 6; +ChooserDialog::ChooserDialog(const String &title, String prefix, const String &buttonLabel) + : Dialog(prefix + "chooser") { // Headline - new StaticTextWidget(this, "chooser_headline", title, kTextAlignCenter); - - yoffset += kLineHeight + 2; + new StaticTextWidget(this, prefix + "chooser_headline", title, kTextAlignCenter); // Add choice list // HACK: Subtracting -12 from the height makes the list look good when // it's used to list savegames in the 320x200 version of the GUI. - _list = new ListWidget(this, "chooser_list"); + _list = new ListWidget(this, prefix + "chooser_list"); _list->setNumberingMode(kListNumberingOff); // Buttons - addButton(this, _w - 2 * (buttonWidth + 10), _h - buttonHeight - 8, "Cancel", kCloseCmd, 0, ws); - _chooseButton = addButton(this, _w - (buttonWidth + 10), _h - buttonHeight - 8, buttonLabel, kChooseCmd, 0, ws); + new ButtonWidget(this, prefix + "chooser_cancel", "Cancel", kCloseCmd, 0); + _chooseButton = new ButtonWidget(this, prefix + "chooser_ok", buttonLabel, kChooseCmd, 0); _chooseButton->setEnabled(false); } diff --git a/gui/chooser.h b/gui/chooser.h index 3e492e1693..cb2e5b63c6 100644 --- a/gui/chooser.h +++ b/gui/chooser.h @@ -42,7 +42,7 @@ protected: ButtonWidget *_chooseButton; public: - ChooserDialog(const String &title, const String &buttonLabel = "Choose", int height = 140); + ChooserDialog(const String &title, String prefix = "defaultChooser_", const String &buttonLabel = "Choose"); void setList(const StringList& list); diff --git a/gui/console.cpp b/gui/console.cpp index e860fea140..d5ad3b3ed4 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -65,7 +65,7 @@ ConsoleDialog::ConsoleDialog(float widthPercent, float heightPercent) // Add scrollbar int scrollBarWidth; - if (screenW >= 400 && screenH >= 300) + if (g_gui.getWidgetSize() == kBigWidgetSize) scrollBarWidth = kBigScrollBarWidth; else scrollBarWidth = kNormalScrollBarWidth; diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 375963b889..46943a1aad 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -312,40 +312,6 @@ ButtonWidget *Dialog::addButton(GuiObject *boss, int x, int y, const Common::Str return new ButtonWidget(boss, x, y, w, h, label, cmd, hotkey, ws); } -CheckboxWidget *Dialog::addCheckbox(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey, WidgetSize ws) { - int w, h; - - if (ws == kBigWidgetSize) { - h = kBigButtonHeight; - } else { - h = kButtonHeight; - } - - w = g_gui.getFontHeight() + 10 + g_gui.getStringWidth(label); - - debug(0, "%s: %d", label.c_str(), g_gui.getStringWidth(label)); - - return new CheckboxWidget(boss, x, y, w, h, label, cmd, hotkey, ws); -} - -SliderWidget *Dialog::addSlider(GuiObject *boss, int x, int y, uint32 cmd, WidgetSize ws) { - int w, h; - - if (ws == kBigWidgetSize) { - w = kBigSliderWidth; - h = kBigSliderHeight; - } else { - w = kSliderWidth; - h = kSliderHeight; - } - - return new SliderWidget(boss, x, y, w, h, cmd); -} - -PopUpWidget *Dialog::addPopUp(GuiObject *boss, int x, int y, int w, const Common::String &label, uint labelWidth, WidgetSize ws) { - return new PopUpWidget(boss, x, y, w, kLineHeight, label, labelWidth, ws); -} - uint32 GuiObject::getMillis() { return g_system->getMillis(); } diff --git a/gui/dialog.h b/gui/dialog.h index 4a1e47add8..9448de2f7e 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -81,9 +81,6 @@ protected: Widget *findWidget(int x, int y); // Find the widget at pos x,y if any ButtonWidget *addButton(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey, WidgetSize ws = kDefaultWidgetSize); - CheckboxWidget *addCheckbox(GuiObject *boss, int x, int y, const Common::String &label, uint32 cmd, char hotkey, WidgetSize ws = kDefaultWidgetSize); - SliderWidget *addSlider(GuiObject *boss, int x, int y, uint32 cmd, WidgetSize ws = kDefaultWidgetSize); - PopUpWidget *addPopUp(GuiObject *boss, int x, int y, int w, const Common::String &label, uint labelWidth = 0, WidgetSize ws = kDefaultWidgetSize); void setResult(int result) { _result = result; } int getResult() const { return _result; } diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 74b89b7485..5bddce0d30 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -80,8 +80,8 @@ enum { */ class DomainEditTextWidget : public EditTextWidget { public: - DomainEditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, WidgetSize ws = kNormalWidgetSize) - : EditTextWidget(boss, x, y, w, h, text, ws) { + DomainEditTextWidget(GuiObject *boss, String name, const String &text) + : EditTextWidget(boss, name, text) { } protected: @@ -138,36 +138,9 @@ protected: }; EditGameDialog::EditGameDialog(const String &domain, const String &desc) - : OptionsDialog(domain, 10, 40, 320 - 2 * 10, 140) { + : OptionsDialog(domain, "gameoptions") { - const int screenW = g_system->getOverlayWidth(); - const int screenH = g_system->getOverlayHeight(); - - _w = screenW - 2 * 10; - - GUI::WidgetSize ws; - int buttonHeight; - int buttonWidth; - int labelWidth; - - if (screenW >= 400 && screenH >= 300) { - ws = GUI::kBigWidgetSize; - _h = screenH - 2 * 40; // TODO/FIXME - buttonHeight = kBigButtonHeight; - buttonWidth = kBigButtonWidth; - labelWidth = 90; - } else { - ws = GUI::kNormalWidgetSize; - _h = screenH - 2 * 30; // TODO/FIXME - buttonHeight = kButtonHeight; - buttonWidth = kButtonWidth; - labelWidth = 60; - } - - const int x = 5; - const int w = _w - 15; - const int vBorder = 5; // Tab border - int yoffset; + int labelWidth = g_gui.evaluator()->getVar("gameOptionsLabelWidth"); // GAME: Path to game data (r/o), extra data (r/o), and save data (r/w) String gamePath(ConfMan.get("path", _domain)); @@ -181,28 +154,24 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) } // GUI: Add tab widget - TabWidget *tab = new TabWidget(this, 0, vBorder, _w, _h - buttonHeight - 8 - 2 * vBorder, ws); + TabWidget *tab = new TabWidget(this, "gameoptions_tabwidget"); tab->setHints(THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND); // // 1) The game tab // tab->addTab("Game"); - yoffset = vBorder; // GUI: Label & edit widget for the game ID - new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "ID: ", kTextAlignRight); - _domainWidget = new DomainEditTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10 - x, kLineHeight, _domain, ws); - yoffset += _domainWidget->getHeight() + 3; + new StaticTextWidget(tab, "gameoptions_id", "ID: ", kTextAlignRight); + _domainWidget = new DomainEditTextWidget(tab, "gameoptions_domain", _domain); // GUI: Label & edit widget for the description - new StaticTextWidget(tab, x, yoffset + 2, labelWidth, kLineHeight, "Name: ", kTextAlignRight); - _descriptionWidget = new EditTextWidget(tab, x + labelWidth, yoffset, _w - labelWidth - 10 - x, kLineHeight, description, ws); - yoffset += _descriptionWidget->getHeight() + 3; + new StaticTextWidget(tab, "gameoptions_name", "Name: ", kTextAlignRight); + _descriptionWidget = new EditTextWidget(tab, "gameoptions_desc", description); // Language popup - _langPopUp = addPopUp(tab, x, yoffset, w, "Language: ", labelWidth, ws); - yoffset += _langPopUp->getHeight() + 4; + _langPopUp = new PopUpWidget(tab, "gameoptions_lang", "Language: ", labelWidth); _langPopUp->appendEntry("<default>"); _langPopUp->appendEntry(""); const Common::LanguageDescription *l = Common::g_languages; @@ -211,8 +180,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) } // Platform popup - _platformPopUp = addPopUp(tab, x, yoffset, w, "Platform: ", labelWidth, ws); - yoffset += _platformPopUp->getHeight() + 4; + _platformPopUp = new PopUpWidget(tab, "gameoptions_platform", "Platform: ", labelWidth); _platformPopUp->appendEntry("<default>"); _platformPopUp->appendEntry(""); const Common::PlatformDescription *p = Common::g_platforms; @@ -222,40 +190,34 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // 2) The 'Path' tab tab->addTab("Paths"); - yoffset = vBorder; // These buttons have to be extra wide, or the text will be truncated // in the small version of the GUI. // GUI: Button + Label for the game path - new ButtonWidget(tab, x, yoffset, buttonWidth + 5, buttonHeight, "Game Path: ", kCmdGameBrowser, 0, ws); - _gamePathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, gamePath, kTextAlignLeft); - yoffset += buttonHeight + 4; + new ButtonWidget(tab, "gameoptions_gamepath", "Game Path: ", kCmdGameBrowser, 0); + _gamePathWidget = new StaticTextWidget(tab, "gameoptions_gamepathText", gamePath, kTextAlignLeft); // GUI: Button + Label for the additional path - new ButtonWidget(tab, x, yoffset, buttonWidth + 5, buttonHeight, "Extra Path:", kCmdExtraBrowser, 0, ws); - _extraPathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, extraPath, kTextAlignLeft); + new ButtonWidget(tab, "gameoptions_extrapath", "Extra Path:", kCmdExtraBrowser, 0); + _extraPathWidget = new StaticTextWidget(tab, "gameoptions_extrapathText", extraPath, kTextAlignLeft); if (extraPath.isEmpty() || !ConfMan.hasKey("extrapath", _domain)) { _extraPathWidget->setLabel("None"); } - yoffset += buttonHeight + 4; // GUI: Button + Label for the save path - new ButtonWidget(tab, x, yoffset, buttonWidth + 5, buttonHeight, "Save Path: ", kCmdSaveBrowser, 0, ws); - _savePathWidget = new StaticTextWidget(tab, x + buttonWidth + 20, yoffset + 3, _w - (x + buttonWidth + 20) - 10, kLineHeight, savePath, kTextAlignLeft); + new ButtonWidget(tab, "gameoptions_savepath", "Save Path: ", kCmdSaveBrowser, 0); + _savePathWidget = new StaticTextWidget(tab, "gameoptions_savepathText", savePath, kTextAlignLeft); if (savePath.isEmpty() || !ConfMan.hasKey("savepath", _domain)) { _savePathWidget->setLabel("Default"); } - yoffset += buttonHeight + 4; // // 3) The graphics tab // tab->addTab("Gfx"); - yoffset = vBorder; - _globalGraphicsOverride = addCheckbox(tab, x, yoffset, "Override global graphic settings", kCmdGlobalGraphicsOverride, 0, ws); - yoffset += _globalGraphicsOverride->getHeight(); + _globalGraphicsOverride = new CheckboxWidget(tab, "gameoptions_graphicsCheckbox", "Override global graphic settings", kCmdGlobalGraphicsOverride, 0); addGraphicControls(tab, "gameoptions_"); @@ -263,10 +225,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // 4) The audio tab // tab->addTab("Audio"); - yoffset = vBorder; - _globalAudioOverride = addCheckbox(tab, x, yoffset, "Override global audio settings", kCmdGlobalAudioOverride, 0, ws); - yoffset += _globalAudioOverride->getHeight(); + _globalAudioOverride = new CheckboxWidget(tab, "gameoptions_audioCheckbox", "Override global audio settings", kCmdGlobalAudioOverride, 0); addAudioControls(tab, "gameoptions_"); @@ -274,10 +234,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // 5) The MIDI tab // tab->addTab("MIDI"); - yoffset = vBorder; - _globalMIDIOverride = addCheckbox(tab, x, yoffset, "Override global MIDI settings", kCmdGlobalMIDIOverride, 0, ws); - yoffset += _globalMIDIOverride->getHeight(); + _globalMIDIOverride = new CheckboxWidget(tab, "gameoptions_midiCheckbox", "Override global MIDI settings", kCmdGlobalMIDIOverride, 0); addMIDIControls(tab, "gameoptions_"); @@ -285,10 +243,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) // 6) The volume tab // tab->addTab("Volume"); - yoffset = vBorder; - _globalVolumeOverride = addCheckbox(tab, x, yoffset, "Override global volume settings", kCmdGlobalVolumeOverride, 0, ws); - yoffset += _globalVolumeOverride->getHeight(); + _globalVolumeOverride = new CheckboxWidget(tab, "gameoptions_volumeCheckbox", "Override global volume settings", kCmdGlobalVolumeOverride, 0); addVolumeControls(tab, "gameoptions_"); @@ -297,8 +253,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc) tab->setActiveTab(0); // Add OK & Cancel buttons - addButton(this, _w - 2 * (buttonWidth + 10), _h - buttonHeight - 8, "Cancel", kCloseCmd, 0, ws); - addButton(this, _w - (buttonWidth + 10), _h - buttonHeight - 8, "OK", kOKCmd, 0, ws); + new ButtonWidget(this, "gameoptions_cancel", "Cancel", kCloseCmd, 0); + new ButtonWidget(this, "gameoptions_ok", "OK", kOKCmd, 0); } void EditGameDialog::open() { @@ -737,7 +693,7 @@ void LauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat editGame(item); break; case kOptionsCmd: { - GlobalOptionsDialog options("globaloptions"); + GlobalOptionsDialog options; options.runModal(); } break; diff --git a/gui/options.cpp b/gui/options.cpp index e2c910ec5a..26fc017992 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -356,9 +356,9 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, String prefix) { _aspectCheckbox = new CheckboxWidget(boss, prefix + "grAspectCheckbox", "Aspect ratio correction", 0, 0); #ifdef SMALL_SCREEN_DEVICE - _fullscreenCheckbox->setState(TRUE); - _fullscreenCheckbox->setEnabled(FALSE); - _aspectCheckbox->setEnabled(FALSE); + _fullscreenCheckbox->setState(true); + _fullscreenCheckbox->setEnabled(false); + _aspectCheckbox->setEnabled(false); #endif _enableGraphicSettings = true; @@ -436,32 +436,8 @@ void OptionsDialog::addVolumeControls(GuiObject *boss, String prefix) { GlobalOptionsDialog::GlobalOptionsDialog() - : OptionsDialog(Common::ConfigManager::kApplicationDomain, 10, 40, 320 - 2 * 10, 140) { + : OptionsDialog(Common::ConfigManager::kApplicationDomain, "globaloptions") { - const int screenW = g_system->getOverlayWidth(); - const int screenH = g_system->getOverlayHeight(); - - if (screenW >= 400 && screenH >= 300) { - _w = screenW - 2 * 10; - _h = screenH - 2 * 40; - _x = 10; - _y = 40; - } else { - _w = screenW - 2 * 10; - _h = screenH - 1 * 20; - _x = 10; - _y = 20; - } - - init(); -} - -GlobalOptionsDialog::GlobalOptionsDialog(String name) - : OptionsDialog(Common::ConfigManager::kApplicationDomain, name) { - init(); -} - -void GlobalOptionsDialog::init() { // The tab widget TabWidget *tab = new TabWidget(this, "globaloptions_tabwidget"); tab->setHints(THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND); diff --git a/gui/options.h b/gui/options.h index d3cc5b5a84..b50920a9a8 100644 --- a/gui/options.h +++ b/gui/options.h @@ -115,10 +115,8 @@ class GlobalOptionsDialog : public OptionsDialog { typedef Common::String String; public: GlobalOptionsDialog(); - GlobalOptionsDialog(String name); ~GlobalOptionsDialog(); - void init(); void open(); void close(); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp index 04969d771f..e6b5e53f30 100644 --- a/gui/theme-config.cpp +++ b/gui/theme-config.cpp @@ -36,7 +36,12 @@ def_kLineHeight=12\n\ def_kFontHeight=10\n\ def_globOptionsW=(w - 2 * 10)\n\ def_globOptionsH=(h - 1 * 40)\n\ +def_gameOptionsH=(h - 2 * 30)\n\ +def_gameOptionsLabelWidth=60\n\ def_tabPopupsLabelW=100\n\ +def_aboutXOff=3\n\ +def_aboutYOff=2\n\ +def_aboutOuterBorder=10\n\ def_scummmainHOffset=8\n\ def_scummmainVSpace=5\n\ def_scummmainVAddOff=2\n\ @@ -57,7 +62,12 @@ def_kLineHeight=16\n\ def_kFontHeight=14\n\ def_globOptionsW=(w - 2 * 10)\n\ def_globOptionsH=(h - 2 * 40)\n\ +def_gameOptionsH=(h - 2 * 40)\n\ +def_gameOptionsLabelWidth=90\n\ def_tabPopupsLabelW=150\n\ +def_aboutXOff=8\n\ +def_aboutYOff=5\n\ +def_aboutOuterBorder=80\n\ def_scummmainHOffset=12\n\ def_scummmainVSpace=7\n\ def_scummmainVAddOff=3\n\ @@ -66,8 +76,22 @@ def_scummmainButtonHeight=28\n\ def_scummhelpW=370\n\ def_scummhelpX=((w - scummhelpW) / 2)\n\ def_midiControlsSpacing=2\n\ -chooser_headline=10 6 (w - 2 * 16) (kLineHeight)\n\ -chooser_list=10 (6 + kLineHeight + 2) (w - 2 * 16) (h - self.y - buttonHeight - 12)\n\ +\n\ +###### chooser\n\ +opHeight=(h * 7 / 10)\n\ +useWithPrefix=chooser defaultChooser_\n\ +\n\ +##### browser\n\ +brW=((w * 7) / 8)\n\ +brH=((h * 9) / 10)\n\ +browser=((w - brW) / 2) ((h - brH) / 2) brW brH\n\ +set_parent=browser\n\ +browser_headline=10 kLineHeight (parent.w - 2 * 10) kLineHeight\n\ +browser_path=10 prev.y2 prev.w prev.h\n\ +browser_list=10 prev.y2 prev.w (parent.h - 3 * kLineHeight - buttonHeight - 14)\n\ +browser_up=10 (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\ +browser_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\ +browser_choose=(prev.x2 + 10) prev.y prev.w prev.h\n\ \n\ ##### launcher\n\ hBorder=10\n\ @@ -93,22 +117,19 @@ launcher_list=hBorder (kLineHeight + 16) (w - 2 * hBorder) (top - kLineHeight - globaloptions=10 40 globOptionsW globOptionsH\n\ set_parent=globaloptions\n\ vBorder=5\n\ -globaloptions_tabwidget=0, vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n\ +globaloptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n\ \n\ # graphics tab\n\ opYoffset=vBorder\n\ -opWidth=globOptionsW\n\ useWithPrefix=graphicsControls globaloptions_\n\ \n\ # audio tab\n\ opYoffset=vBorder\n\ -opWidth=globOptionsW\n\ useWithPrefix=audioControls globaloptions_\n\ useWithPrefix=volumeControls globaloptions_\n\ \n\ # MIDI tab\n\ opYoffset=vBorder\n\ -opWidth=globOptionsW\n\ useWithPrefix=midiControls globaloptions_\n\ \n\ # paths tab\n\ @@ -125,18 +146,66 @@ globaloptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeigh globaloptions_ok=(prev.x2 + 10) prev.y prev.w prev.h\n\ \n\ ### game options\n\ -opYoffset=(vBorder + buttonHeight)\n\ -opWidth=globOptionsW\n\ +gameoptions=10 40 (w - 2 * 10) gameOptionsH\n\ +set_parent=gameoptions\n\ +vBorder=5\n\ +gox=5\n\ +gow=(parent.w - 15)\n\ +\n\ +gameoptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)\n\ +\n\ +# game tab\n\ +opYoffset=vBorder\n\ +gameoptions_id=gox (opYoffset + 2) gameOptionsLabelWidth kLineHeight\n\ +gameoptions_domain=prev.x2 (prev.y - 1) (parent.w - gameOptionsLabelWidth - 10 - gox) (prev.h + 2)\n\ +opYoffset=(opYoffset + prev.h + 3)\n\ +gameoptions_name=gox (opYoffset + 2) gameOptionsLabelWidth kLineHeight\n\ +gameoptions_desc=prev.x2 (prev.y - 1) (parent.w - gameOptionsLabelWidth - 10 - gox) (prev.h + 2)\n\ +opYoffset=(opYoffset + prev.h + 3)\n\ +gameoptions_lang=gox (opYoffset - 1) gow (kLineHeight + 2)\n\ +opYoffset=(opYoffset + prev.h + 4)\n\ +gameoptions_platform=prev.x opYoffset prev.w prev.h\n\ +opYoffset=(opYoffset + prev.h + 4)\n\ +\n\ +# paths tab\n\ +opYoffset=vBorder\n\ +goOff=((buttonHeight - kLineHeight) / 2 + 2)\n\ +gameoptions_gamepath=gox opYoffset (buttonWidth + 5) buttonHeight\n\ +gameoptions_gamepathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight\n\ +opYoffset=(opYoffset + buttonHeight + 4)\n\ +gameoptions_extrapath=gox opYoffset (buttonWidth + 5) buttonHeight\n\ +gameoptions_extrapathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight\n\ +opYoffset=(opYoffset + buttonHeight + 4)\n\ +gameoptions_savepath=gox opYoffset (buttonWidth + 5) buttonHeight\n\ +gameoptions_savepathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight\n\ +opYoffset=(opYoffset + buttonHeight + 4)\n\ +\n\ +# graphics tab\n\ +opYoffset=vBorder\n\ +gameoptions_graphicsCheckbox=gox opYoffset (kFontHeight + 10 + 192) buttonHeight\n\ +opYoffset=(opYoffset + buttonHeight)\n\ useWithPrefix=graphicsControls gameoptions_\n\ \n\ -opYoffset=(vBorder + buttonHeight)\n\ +# audio tab\n\ +opYoffset=vBorder\n\ +gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight\n\ +opYoffset=(opYoffset + buttonHeight)\n\ useWithPrefix=audioControls gameoptions_\n\ \n\ -opYoffset=(vBorder + buttonHeight)\n\ +# midi tab\n\ +opYoffset=vBorder\n\ +gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight\n\ +opYoffset=(opYoffset + buttonHeight)\n\ +useWithPrefix=midiControls gameoptions_\n\ +\n\ +# volume tab\n\ +opYoffset=vBorder\n\ +gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 189) buttonHeight\n\ +opYoffset=(opYoffset + buttonHeight)\n\ useWithPrefix=volumeControls gameoptions_\n\ \n\ -opYoffset=(vBorder + buttonHeight)\n\ -useWithPrefix=midiControls gameoptions_\n\ +gameoptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\ +gameoptions_ok=(prev.x2 + 10) prev.y prev.w prev.h\n\ \n\ ### keys dialog\n\ keysdialog=(w / 20) (h / 10) (w - w / 10) (h - h / 5)\n\ @@ -148,6 +217,8 @@ keysdialog_list=10 10 (prev.x - 20) (parent.h - kLineHeight * 4 - self.y)\n\ keysdialog_action=prev.x (parent.h - kLineHeight * 3) (parent.w - self.x * 2) kLineHeight\n\ keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h\n\ \n\ +\n\ +\n\ ##### SCUMM dialogs\n\ scummDummyDialog=0 80 0 16\n\ \n\ @@ -216,14 +287,25 @@ scummsaveload_list=10 18 (parent.w - 2 * 10 - 180) (parent.h - 14 - buttonHeight scummsaveload_thumbnail=(parent.w - (kThumbnailWidth + 22)) 18\n\ scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight\n\ scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h\n\ +opHeight=(h * 9 / 10)\n\ +useWithPrefix=chooser scummsaveload_\n\ \n\ ############################################\n\ +[chooser]\n\ +chooserW=(w - 2 * 8)\n\ +chooser=((w - chooserW) / 2) ((h - opHeight) / 2) chooserW opHeight\n\ +chooser_headline=10 6 (chooserW - 2 * 10) (kLineHeight)\n\ +chooser_list=10 (6 + kLineHeight + 2) prev.w (h - self.y - buttonHeight - 12)\n\ +chooser_cancel=(chooserW - 2 * (buttonWidth + 10)) (opHeight - buttonHeight - 8) buttonWidth buttonHeight\n\ +chooser_ok=(prev.x2 + 10) prev.y prev.w prev.h\n\ +\n\ +\n\ [graphicsControls]\n\ gcx=10\n\ -gcw=(opWidth - 2 * 10)\n\ -grModePopup=(gcx - 5) opYoffset (gcw + 5) kLineHeight\n\ +gcw=(parent.w - 2 * 10)\n\ +grModePopup=(gcx - 5) (opYoffset - 1) (gcw + 5) (kLineHeight + 2)\n\ opYoffset=(opYoffset + kLineHeight + 4)\n\ -grRenderPopup=prev.x opYoffset prev.w prev.h\n\ +grRenderPopup=prev.x (opYoffset - 1) prev.w prev.h\n\ opYoffset=(opYoffset + kLineHeight + 4)\n\ grFullscreenCheckbox=gcx opYoffset (kFontHeight + 10 + 96) buttonHeight\n\ opYoffset=(opYoffset + buttonHeight)\n\ @@ -232,8 +314,8 @@ opYoffset=(opYoffset + buttonHeight)\n\ \n\ [audioControls]\n\ aux=10\n\ -auw=(opWidth - 2 * 10)\n\ -auMidiPopup=(aux - 5) opYoffset (auw + 5) kLineHeight\n\ +auw=(parent.w - 2 * 10)\n\ +auMidiPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)\n\ opYoffset=(opYoffset + kLineHeight + 4)\n\ auSubtitlesCheckbox=aux opYoffset (kFontHeight + 10 + 102) buttonHeight\n\ opYoffset=(opYoffset + buttonHeight + 18)\n\ @@ -257,7 +339,7 @@ opYoffset=(opYoffset + sliderHeight + 4)\n\ [midiControls]\n\ mcx=10\n\ mcFontButton=mcx opYoffset buttonWidth buttonHeight\n\ -mcFontPath=(prev.x2 + 20) (opYoffset + 3) (opWidth - (buttonWidth + 20) - 10) kLineHeight\n\ +mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 10) kLineHeight\n\ opYoffset=(opYoffset + buttonHeight + 2 * midiControlsSpacing)\n\ mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight\n\ opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)\n\ diff --git a/gui/themes/default-theme.ini b/gui/themes/default-theme.ini index fb3b20c67e..71685d1f46 100644 --- a/gui/themes/default-theme.ini +++ b/gui/themes/default-theme.ini @@ -140,7 +140,12 @@ def_kLineHeight=12 def_kFontHeight=10 def_globOptionsW=(w - 2 * 10) def_globOptionsH=(h - 1 * 40) +def_gameOptionsH=(h - 2 * 30) +def_gameOptionsLabelWidth=60 def_tabPopupsLabelW=100 +def_aboutXOff=3 +def_aboutYOff=2 +def_aboutOuterBorder=10 def_scummmainHOffset=8 def_scummmainVSpace=5 def_scummmainVAddOff=2 @@ -161,7 +166,12 @@ def_kLineHeight=16 def_kFontHeight=14 def_globOptionsW=(w - 2 * 10) def_globOptionsH=(h - 2 * 40) +def_gameOptionsH=(h - 2 * 40) +def_gameOptionsLabelWidth=90 def_tabPopupsLabelW=150 +def_aboutXOff=8 +def_aboutYOff=5 +def_aboutOuterBorder=80 def_scummmainHOffset=12 def_scummmainVSpace=7 def_scummmainVAddOff=3 @@ -170,8 +180,22 @@ def_scummmainButtonHeight=28 def_scummhelpW=370 def_scummhelpX=((w - scummhelpW) / 2) def_midiControlsSpacing=2 -chooser_headline=10 6 (w - 2 * 16) (kLineHeight) -chooser_list=10 (6 + kLineHeight + 2) (w - 2 * 16) (h - self.y - buttonHeight - 12) + +###### chooser +opHeight=(h * 7 / 10) +useWithPrefix=chooser defaultChooser_ + +##### browser +brW=((w * 7) / 8) +brH=((h * 9) / 10) +browser=((w - brW) / 2) ((h - brH) / 2) brW brH +set_parent=browser +browser_headline=10 kLineHeight (parent.w - 2 * 10) kLineHeight +browser_path=10 prev.y2 prev.w prev.h +browser_list=10 prev.y2 prev.w (parent.h - 3 * kLineHeight - buttonHeight - 14) +browser_up=10 (parent.h - buttonHeight - 8) buttonWidth buttonHeight +browser_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight +browser_choose=(prev.x2 + 10) prev.y prev.w prev.h ##### launcher hBorder=10 @@ -197,22 +221,19 @@ launcher_list=hBorder (kLineHeight + 16) (w - 2 * hBorder) (top - kLineHeight - globaloptions=10 40 globOptionsW globOptionsH set_parent=globaloptions vBorder=5 -globaloptions_tabwidget=0, vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder) +globaloptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder) # graphics tab opYoffset=vBorder -opWidth=globOptionsW useWithPrefix=graphicsControls globaloptions_ # audio tab opYoffset=vBorder -opWidth=globOptionsW useWithPrefix=audioControls globaloptions_ useWithPrefix=volumeControls globaloptions_ # MIDI tab opYoffset=vBorder -opWidth=globOptionsW useWithPrefix=midiControls globaloptions_ # paths tab @@ -229,18 +250,66 @@ globaloptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeigh globaloptions_ok=(prev.x2 + 10) prev.y prev.w prev.h ### game options -opYoffset=(vBorder + buttonHeight) -opWidth=globOptionsW +gameoptions=10 40 (w - 2 * 10) gameOptionsH +set_parent=gameoptions +vBorder=5 +gox=5 +gow=(parent.w - 15) + +gameoptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder) + +# game tab +opYoffset=vBorder +gameoptions_id=gox (opYoffset + 2) gameOptionsLabelWidth kLineHeight +gameoptions_domain=prev.x2 (prev.y - 1) (parent.w - gameOptionsLabelWidth - 10 - gox) (prev.h + 2) +opYoffset=(opYoffset + prev.h + 3) +gameoptions_name=gox (opYoffset + 2) gameOptionsLabelWidth kLineHeight +gameoptions_desc=prev.x2 (prev.y - 1) (parent.w - gameOptionsLabelWidth - 10 - gox) (prev.h + 2) +opYoffset=(opYoffset + prev.h + 3) +gameoptions_lang=gox (opYoffset - 1) gow (kLineHeight + 2) +opYoffset=(opYoffset + prev.h + 4) +gameoptions_platform=prev.x opYoffset prev.w prev.h +opYoffset=(opYoffset + prev.h + 4) + +# paths tab +opYoffset=vBorder +goOff=((buttonHeight - kLineHeight) / 2 + 2) +gameoptions_gamepath=gox opYoffset (buttonWidth + 5) buttonHeight +gameoptions_gamepathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight +opYoffset=(opYoffset + buttonHeight + 4) +gameoptions_extrapath=gox opYoffset (buttonWidth + 5) buttonHeight +gameoptions_extrapathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight +opYoffset=(opYoffset + buttonHeight + 4) +gameoptions_savepath=gox opYoffset (buttonWidth + 5) buttonHeight +gameoptions_savepathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight +opYoffset=(opYoffset + buttonHeight + 4) + +# graphics tab +opYoffset=vBorder +gameoptions_graphicsCheckbox=gox opYoffset (kFontHeight + 10 + 192) buttonHeight +opYoffset=(opYoffset + buttonHeight) useWithPrefix=graphicsControls gameoptions_ -opYoffset=(vBorder + buttonHeight) +# audio tab +opYoffset=vBorder +gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight +opYoffset=(opYoffset + buttonHeight) useWithPrefix=audioControls gameoptions_ -opYoffset=(vBorder + buttonHeight) +# midi tab +opYoffset=vBorder +gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight +opYoffset=(opYoffset + buttonHeight) +useWithPrefix=midiControls gameoptions_ + +# volume tab +opYoffset=vBorder +gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 189) buttonHeight +opYoffset=(opYoffset + buttonHeight) useWithPrefix=volumeControls gameoptions_ -opYoffset=(vBorder + buttonHeight) -useWithPrefix=midiControls gameoptions_ +gameoptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight +gameoptions_ok=(prev.x2 + 10) prev.y prev.w prev.h ### keys dialog keysdialog=(w / 20) (h / 10) (w - w / 10) (h - h / 5) @@ -252,6 +321,8 @@ keysdialog_list=10 10 (prev.x - 20) (parent.h - kLineHeight * 4 - self.y) keysdialog_action=prev.x (parent.h - kLineHeight * 3) (parent.w - self.x * 2) kLineHeight keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h + + ##### SCUMM dialogs scummDummyDialog=0 80 0 16 @@ -320,14 +391,25 @@ scummsaveload_list=10 18 (parent.w - 2 * 10 - 180) (parent.h - 14 - buttonHeight scummsaveload_thumbnail=(parent.w - (kThumbnailWidth + 22)) 18 scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h +opHeight=(h * 9 / 10) +useWithPrefix=chooser scummsaveload_ ############################################ +[chooser] +chooserW=(w - 2 * 8) +chooser=((w - chooserW) / 2) ((h - opHeight) / 2) chooserW opHeight +chooser_headline=10 6 (chooserW - 2 * 10) (kLineHeight) +chooser_list=10 (6 + kLineHeight + 2) prev.w (h - self.y - buttonHeight - 12) +chooser_cancel=(chooserW - 2 * (buttonWidth + 10)) (opHeight - buttonHeight - 8) buttonWidth buttonHeight +chooser_ok=(prev.x2 + 10) prev.y prev.w prev.h + + [graphicsControls] gcx=10 -gcw=(opWidth - 2 * 10) -grModePopup=(gcx - 5) opYoffset (gcw + 5) kLineHeight +gcw=(parent.w - 2 * 10) +grModePopup=(gcx - 5) (opYoffset - 1) (gcw + 5) (kLineHeight + 2) opYoffset=(opYoffset + kLineHeight + 4) -grRenderPopup=prev.x opYoffset prev.w prev.h +grRenderPopup=prev.x (opYoffset - 1) prev.w prev.h opYoffset=(opYoffset + kLineHeight + 4) grFullscreenCheckbox=gcx opYoffset (kFontHeight + 10 + 96) buttonHeight opYoffset=(opYoffset + buttonHeight) @@ -336,8 +418,8 @@ opYoffset=(opYoffset + buttonHeight) [audioControls] aux=10 -auw=(opWidth - 2 * 10) -auMidiPopup=(aux - 5) opYoffset (auw + 5) kLineHeight +auw=(parent.w - 2 * 10) +auMidiPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2) opYoffset=(opYoffset + kLineHeight + 4) auSubtitlesCheckbox=aux opYoffset (kFontHeight + 10 + 102) buttonHeight opYoffset=(opYoffset + buttonHeight + 18) @@ -361,7 +443,7 @@ opYoffset=(opYoffset + sliderHeight + 4) [midiControls] mcx=10 mcFontButton=mcx opYoffset buttonWidth buttonHeight -mcFontPath=(prev.x2 + 20) (opYoffset + 3) (opWidth - (buttonWidth + 20) - 10) kLineHeight +mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 10) kLineHeight opYoffset=(opYoffset + buttonHeight + 2 * midiControlsSpacing) mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight opYoffset=(opYoffset + buttonHeight + midiControlsSpacing) |