Added tickmarks to sliders.

This commit is contained in:
thrust26 2018-07-31 17:51:53 +02:00
parent a24e042d1e
commit 6cafbba3e4
7 changed files with 25 additions and 1 deletions

View File

@ -69,6 +69,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
myVolumeSlider = new SliderWidget(this, font, xpos, ypos,
"Volume ", 0, 0, 4 * fontWidth, "%");
myVolumeSlider->setMinValue(1); myVolumeSlider->setMaxValue(100);
myVolumeSlider->setTickmarkInterval(4);
wid.push_back(myVolumeSlider);
ypos += lineHeight + 4;
@ -126,6 +127,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
myHeadroomSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
"Headroom ", 0, 0, 2 * fontWidth);
myHeadroomSlider->setMinValue(1); myHeadroomSlider->setMaxValue(AudioSettings::MAX_HEADROOM);
myHeadroomSlider->setTickmarkInterval(5);
wid.push_back(myHeadroomSlider);
ypos += lineHeight + 4;
@ -133,6 +135,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
myBufferSizeSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
"Buffer size ", 0, 0, 2 * fontWidth);
myBufferSizeSlider->setMinValue(1); myBufferSizeSlider->setMaxValue(AudioSettings::MAX_BUFFER_SIZE);
myBufferSizeSlider->setTickmarkInterval(5);
wid.push_back(myBufferSizeSlider);
// Add message concerning usage

View File

@ -341,6 +341,7 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
myStateSizeWidget->setMinValue(20);
myStateSizeWidget->setMaxValue(1000);
myStateSizeWidget->setStepValue(20);
myStateSizeWidget->setTickmarkInterval(5);
wid.push_back(myStateSizeWidget);
ypos += lineHeight + VGAP;
@ -349,6 +350,7 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
myUncompressedWidget->setMinValue(0);
myUncompressedWidget->setMaxValue(1000);
myUncompressedWidget->setStepValue(20);
myUncompressedWidget->setTickmarkInterval(5);
wid.push_back(myUncompressedWidget);
ypos += lineHeight + VGAP;
@ -429,6 +431,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
myDebuggerWidthSlider->setMinValue(DebuggerDialog::kSmallFontMinW);
myDebuggerWidthSlider->setMaxValue(ds.w);
myDebuggerWidthSlider->setStepValue(10);
myDebuggerWidthSlider->setTickmarkInterval(5);
wid.push_back(myDebuggerWidthSlider);
ypos += lineHeight + VGAP;
@ -437,6 +440,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
myDebuggerHeightSlider->setMinValue(DebuggerDialog::kSmallFontMinH);
myDebuggerHeightSlider->setMaxValue(ds.h);
myDebuggerHeightSlider->setStepValue(10);
myDebuggerHeightSlider->setTickmarkInterval(5);
wid.push_back(myDebuggerHeightSlider);
ypos += lineHeight + VGAP * 4;

View File

@ -266,6 +266,7 @@ GameInfoDialog::GameInfoDialog(
myMouseRange = new SliderWidget(myTab, font, HBORDER, ypos,
"Mouse axes range ", 0, 0, fontWidth * 4, "%");
myMouseRange->setMinValue(1); myMouseRange->setMaxValue(100);
myMouseRange->setTickmarkInterval(4);
wid.push_back(myMouseRange);
// Add message concerning usage
@ -303,6 +304,7 @@ GameInfoDialog::GameInfoDialog(
"", 0, kYStartChanged, 4 * fontWidth, "px");
myYStart->setMinValue(TIAConstants::minYStart-1);
myYStart->setMaxValue(TIAConstants::maxYStart);
myYStart->setTickmarkInterval(4);
wid.push_back(myYStart);
ypos += lineHeight + VGAP;
@ -311,6 +313,7 @@ GameInfoDialog::GameInfoDialog(
"", 0, kHeightChanged, 5 * fontWidth, "px");
myHeight->setMinValue(TIAConstants::minViewableHeight-1);
myHeight->setMaxValue(TIAConstants::maxViewableHeight);
myHeight->setTickmarkInterval(4);
wid.push_back(myHeight);
// Phosphor
@ -322,6 +325,7 @@ GameInfoDialog::GameInfoDialog(
myPhosphor->getRight() + fontWidth * 3, myPhosphor->getTop()-2,
"Blend ", 0, kPPBlendChanged, 7 * fontWidth, "%");
myPPBlend->setMinValue(0); myPPBlend->setMaxValue(100);
myPPBlend->setTickmarkInterval(2);
wid.push_back(myPPBlend);
// Add items for tab 3

View File

@ -148,6 +148,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
myDeadzone = new SliderWidget(myTab, font, HBORDER, ypos,
"Joystick deadzone size ", lwidth, kDeadzoneChanged);
myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29);
myDeadzone->setTickmarkInterval(4);
xpos = HBORDER + myDeadzone->getWidth() + 5;
myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth, lineHeight, "");
wid.push_back(myDeadzone);
@ -158,6 +159,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
"Digital paddle sensitivity ",
lwidth, kDPSpeedChanged);
myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20);
myDPaddleSpeed->setTickmarkInterval(4);
xpos = HBORDER + myDPaddleSpeed->getWidth() + 5;
myDPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, "");
wid.push_back(myDPaddleSpeed);
@ -168,6 +170,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
"Mouse paddle sensitivity ",
lwidth, kMPSpeedChanged);
myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20);
myMPaddleSpeed->setTickmarkInterval(4);
xpos = HBORDER + myMPaddleSpeed->getWidth() + 5;
myMPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, "");
wid.push_back(myMPaddleSpeed);
@ -178,6 +181,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
"Trackball sensitivity ",
lwidth, kTBSpeedChanged);
myTrackBallSpeed->setMinValue(1); myTrackBallSpeed->setMaxValue(20);
myTrackBallSpeed->setTickmarkInterval(4);
xpos = HBORDER + myTrackBallSpeed->getWidth() + 5;
myTrackBallLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, "");
wid.push_back(myTrackBallSpeed);

View File

@ -77,6 +77,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
font.getStringWidth("10 seconds"));
mySnapInterval->setMinValue(1);
mySnapInterval->setMaxValue(10);
mySnapInterval->setTickmarkInterval(3);
wid.push_back(mySnapInterval);
// Booleans for saving snapshots

View File

@ -86,6 +86,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
myListDelayPopup->setMinValue(0);
myListDelayPopup->setMaxValue(1000);
myListDelayPopup->setStepValue(50);
myListDelayPopup->setTickmarkInterval(5);
wid.push_back(myListDelayPopup);
ypos += lineHeight + 4;
@ -95,6 +96,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
font.getStringWidth("10 lines"));
myWheelLinesPopup->setMinValue(1);
myWheelLinesPopup->setMaxValue(10);
myWheelLinesPopup->setTickmarkInterval(3);
wid.push_back(myWheelLinesPopup);
// Add message concerning usage
@ -121,6 +123,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
myLauncherWidthSlider->setMinValue(FrameBuffer::kFBMinW);
myLauncherWidthSlider->setMaxValue(ds.w);
myLauncherWidthSlider->setStepValue(10);
myLauncherWidthSlider->setTickmarkInterval(5);
wid.push_back(myLauncherWidthSlider);
ypos += lineHeight + 4;
@ -129,6 +132,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
myLauncherHeightSlider->setMinValue(FrameBuffer::kFBMinH);
myLauncherHeightSlider->setMaxValue(ds.h);
myLauncherHeightSlider->setStepValue(10);
myLauncherHeightSlider->setTickmarkInterval(5);
wid.push_back(myLauncherHeightSlider);
ypos += lineHeight + 4;

View File

@ -147,6 +147,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
"NTSC aspect ", lwidth, 0,
fontWidth * 4, "%");
myNAspectRatio->setMinValue(80); myNAspectRatio->setMaxValue(120);
myNAspectRatio->setTickmarkInterval(2);
wid.push_back(myNAspectRatio);
ypos += lineHeight + VGAP;
@ -156,6 +157,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
"PAL aspect ", lwidth, 0,
fontWidth * 4, "%");
myPAspectRatio->setMinValue(80); myPAspectRatio->setMaxValue(120);
myPAspectRatio->setTickmarkInterval(2);
wid.push_back(myPAspectRatio);
ypos += lineHeight + VGAP;
@ -165,6 +167,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
"Emul. speed ", lwidth, kSpeedupChanged, fontWidth * 5, "%");
mySpeed->setMinValue(MIN_SPEED); mySpeed->setMaxValue(MAX_SPEED);
mySpeed->setStepValue(SPEED_STEP);
mySpeed->setTickmarkInterval(2);
wid.push_back(mySpeed);
ypos += lineHeight + VGAP;
@ -247,8 +250,9 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
#define CREATE_CUSTOM_SLIDERS(obj, desc) \
myTV ## obj = \
new SliderWidget(myTab, font, xpos, ypos-1, swidth, lineHeight, \
desc, lwidth, 0, fontWidth*4, "%"); \
desc, lwidth, 0, fontWidth*4, "%"); \
myTV ## obj->setMinValue(0); myTV ## obj->setMaxValue(100); \
myTV ## obj->setTickmarkInterval(2); \
wid.push_back(myTV ## obj); \
ypos += lineHeight + VGAP;