diff options
author | Bastien Bouclet | 2019-11-07 11:02:00 +0100 |
---|---|---|
committer | Bastien Bouclet | 2019-11-07 11:02:00 +0100 |
commit | 6901ee0242c128d3b6026f83a10da4ca90e265e0 (patch) | |
tree | aa901fd36658b97bae8f3e83c21aafa37a2b1595 /backends/platform/3ds/options-dialog.cpp | |
parent | e34d27c1bdc7b58368767d250494ad5946a0bf67 (diff) | |
download | scummvm-rg350-6901ee0242c128d3b6026f83a10da4ca90e265e0.tar.gz scummvm-rg350-6901ee0242c128d3b6026f83a10da4ca90e265e0.tar.bz2 scummvm-rg350-6901ee0242c128d3b6026f83a10da4ca90e265e0.zip |
3DS: Use the full resolution for the overlay on the top screen
Diffstat (limited to 'backends/platform/3ds/options-dialog.cpp')
-rw-r--r-- | backends/platform/3ds/options-dialog.cpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/backends/platform/3ds/options-dialog.cpp b/backends/platform/3ds/options-dialog.cpp index a6be649ac0..d57daa7cdc 100644 --- a/backends/platform/3ds/options-dialog.cpp +++ b/backends/platform/3ds/options-dialog.cpp @@ -61,7 +61,7 @@ OptionsDialog::OptionsDialog() : GUI::Dialog(20, 20, 280, 200) { _screenRadioGroup->setValue(config.screen); new GUI::StaticTextWidget(this, 0, 100, 110, 15, _("C-Pad Sensitivity:"), Graphics::kTextAlignRight); - _sensitivity = new GUI::SliderWidget(this, 115, 100, 160, 15, "TODO: Add tooltip", 1); + _sensitivity = new GUI::SliderWidget(this, 115, 100, 160, 15); _sensitivity->setMinValue(-15); _sensitivity->setMaxValue(30); _sensitivity->setValue(config.sensitivity); @@ -72,20 +72,41 @@ OptionsDialog::~OptionsDialog() { optionMenuOpened = false; } -void OptionsDialog::updateConfigManager() { - config.showCursor = _showCursorCheckbox->getState(); - config.snapToBorder = _snapToBorderCheckbox->getState(); - config.stretchToFit = _stretchToFitCheckbox->getState(); - config.sensitivity = _sensitivity->getValue(); - config.screen = _screenRadioGroup->getValue(); - saveConfig(); - loadConfig(); +bool OptionsDialog::getShowCursor() const { + return _showCursorCheckbox->getState(); +} + +bool OptionsDialog::getSnapToBorder() const { + return _snapToBorderCheckbox->getState(); +} + +bool OptionsDialog::getStretchToFit() const { + return _stretchToFitCheckbox->getState(); +} + +int OptionsDialog::getSensitivity() const { + return _sensitivity->getValue(); +} + +int OptionsDialog::getScreen() const { + return _screenRadioGroup->getValue(); +} + +void OptionsDialog::reflowLayout() { + const int screenW = g_system->getOverlayWidth(); + const int screenH = g_system->getOverlayHeight(); + + // Center the dialog + _x = (screenW - getWidth()) / 2; + _y = (screenH - getHeight()) / 2; + + GUI::Dialog::reflowLayout(); } void OptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch(cmd) { case GUI::kOKCmd: - updateConfigManager(); + setResult(1); // Fall through case GUI::kCloseCmd: close(); |