[Scummvm-git-logs] scummvm master -> dc4cfa05fe77224adf8c806309145e881d4ea8b9
eriktorbjorn
noreply at scummvm.org
Sat Feb 12 11:03:55 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dc4cfa05fe SCUMM: Display Loom Overture Timing value as time, not a magic number
Commit: dc4cfa05fe77224adf8c806309145e881d4ea8b9
https://github.com/scummvm/scummvm/commit/dc4cfa05fe77224adf8c806309145e881d4ea8b9
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-02-12T12:02:55+01:00
Commit Message:
SCUMM: Display Loom Overture Timing value as time, not a magic number
It makes it less obvious what the default was, but I think this is a lot
more user friendly. For some reason, it looks awful in RTL languages,
but I have no idea how to fix that.
Changed paths:
engines/scumm/dialogs.cpp
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 7eaa9905db0..0abe9310c2e 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -701,16 +701,16 @@ void LoomTownsDifficultyDialog::handleCommand(GUI::CommandSender *sender, uint32
EgaLoomOptionsWidget::EgaLoomOptionsWidget(GuiObject *boss, const Common::String &name, const Common::String &domain) :
OptionsContainerWidget(boss, name, "EgaLoomOptionsDialog", false, domain) {
- new GUI::StaticTextWidget(widgetsBoss(), "EgaLoomOptionsDialog.OvertureTicksHeader", _("Overture Timing:"));
+ GUI::StaticTextWidget *text = new GUI::StaticTextWidget(widgetsBoss(), "EgaLoomOptionsDialog.OvertureTicksHeader", _("Overture Timing:"));
- _overtureTicksSlider = new GUI::SliderWidget(widgetsBoss(), "EgaLoomOptionsDialog.OvertureTicks", _("Adjusts the timing of the EGA Loom Overture when using enhanced music. The lower the value, the earlier the Lucasfilm logo appears."), kOvertureTicksChanged);
+ text->setAlign(Graphics::TextAlign::kTextAlignEnd);
- // Each step of the slider changes the assumed length of the Loom
- // Overture by ten SCUMM ticks. When I timed it, I was able to set the
- // transition to happen anywhere between approximately 1:30 and 2:20,
- // which should be more than enough. I think it's nice if the interval
- // is small enough that you can set the slider back to 0 at reasonable
- // screen resolutions.
+ _overtureTicksSlider = new GUI::SliderWidget(widgetsBoss(), "EgaLoomOptionsDialog.OvertureTicks", _("When using replacement music, this adjusts the time when the Overture changes to the scene with the Lucasfilm and Loom logotypes."), kOvertureTicksChanged);
+
+ // This allows the transition in the Loom Overture to be changed by
+ // 20 seconds in each direction. I think it's nice if the interval is
+ // small enough that you can set the slider back to default at any
+ // reasonable screen resolution.
_overtureTicksSlider->setMinValue(-200);
_overtureTicksSlider->setMaxValue(200);
@@ -738,11 +738,12 @@ bool EgaLoomOptionsWidget::save() {
void EgaLoomOptionsWidget::defineLayout(GUI::ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const {
layouts.addDialog(layoutName, overlayedLayout)
.addLayout(GUI::ThemeLayout::kLayoutHorizontal)
- .addPadding(16, 16, 16, 16)
+ .addPadding(0, 0, 16, 0)
.addWidget("OvertureTicksHeader", "OptionsLabel")
+ .addSpace(2)
.addWidget("OvertureTicks", "WideSlider")
- .addSpace(8)
- .addWidget("OvertureTicksLabel", "SmallLabel")
+ .addSpace(2)
+ .addWidget("OvertureTicksLabel", "ShortOptionsLabel")
.closeLayout()
.closeDialog();
}
@@ -760,8 +761,9 @@ void EgaLoomOptionsWidget::handleCommand(GUI::CommandSender *sender, uint32 cmd,
}
void EgaLoomOptionsWidget::updateOvertureTicksLabel() {
- _overtureTicksLabel->setValue(_overtureTicksSlider->getValue());
- _overtureTicksLabel->markAsDirty();
+ int ticks = DEFAULT_LOOM_OVERTURE_TRANSITION + _overtureTicksSlider->getValue();
+
+ _overtureTicksLabel->setLabel(Common::String::format("%d:%02d.%d", ticks / 600, (ticks % 600) / 10, ticks % 10));
}
} // End of namespace Scumm
More information about the Scummvm-git-logs
mailing list