mirror of https://github.com/stella-emu/stella.git
optimized some tickmarks (number now based on value range)
This commit is contained in:
parent
ce9b832f68
commit
503d861c2e
|
@ -141,7 +141,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myHeadroomSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
|
||||
"Headroom ", 0, kHeadroomChanged, 10 * fontWidth);
|
||||
myHeadroomSlider->setMinValue(0); myHeadroomSlider->setMaxValue(AudioSettings::MAX_HEADROOM);
|
||||
myHeadroomSlider->setTickmarkInterval(3);
|
||||
myHeadroomSlider->setTickmarkInterval(5);
|
||||
wid.push_back(myHeadroomSlider);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
@ -149,7 +149,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myBufferSizeSlider = new SliderWidget(this, font, xpos, ypos, swidth, lineHeight,
|
||||
"Buffer size ", 0, kBufferSizeChanged, 10 * fontWidth);
|
||||
myBufferSizeSlider->setMinValue(0); myBufferSizeSlider->setMaxValue(AudioSettings::MAX_BUFFER_SIZE);
|
||||
myBufferSizeSlider->setTickmarkInterval(3);
|
||||
myBufferSizeSlider->setTickmarkInterval(5);
|
||||
wid.push_back(myBufferSizeSlider);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
|
|
|
@ -429,7 +429,8 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
myDebuggerWidthSlider->setMinValue(DebuggerDialog::kSmallFontMinW);
|
||||
myDebuggerWidthSlider->setMaxValue(ds.w);
|
||||
myDebuggerWidthSlider->setStepValue(10);
|
||||
myDebuggerWidthSlider->setTickmarkInterval(5);
|
||||
// one tickmark every ~100 pixel
|
||||
myDebuggerWidthSlider->setTickmarkInterval((ds.w - DebuggerDialog::kSmallFontMinW + 50) / 100);
|
||||
wid.push_back(myDebuggerWidthSlider);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
@ -438,7 +439,8 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
myDebuggerHeightSlider->setMinValue(DebuggerDialog::kSmallFontMinH);
|
||||
myDebuggerHeightSlider->setMaxValue(ds.h);
|
||||
myDebuggerHeightSlider->setStepValue(10);
|
||||
myDebuggerHeightSlider->setTickmarkInterval(5);
|
||||
// one tickmark every ~100 pixel
|
||||
myDebuggerHeightSlider->setTickmarkInterval((ds.h - DebuggerDialog::kSmallFontMinH + 50) / 100);
|
||||
wid.push_back(myDebuggerHeightSlider);
|
||||
ypos += lineHeight + VGAP * 4;
|
||||
|
||||
|
|
|
@ -309,7 +309,8 @@ GameInfoDialog::GameInfoDialog(
|
|||
" ", 0, kYStartChanged, 5 * fontWidth, "px");
|
||||
myYStart->setMinValue(TIAConstants::minYStart-1);
|
||||
myYStart->setMaxValue(TIAConstants::maxYStart);
|
||||
myYStart->setTickmarkInterval(4);
|
||||
// one tickmark every ~10 pixel
|
||||
myYStart->setTickmarkInterval((TIAConstants::maxYStart - (TIAConstants::minYStart-1) + 5) / 10);
|
||||
wid.push_back(myYStart);
|
||||
|
||||
int iWidth = ifont.getCharWidth('2');
|
||||
|
@ -322,7 +323,8 @@ GameInfoDialog::GameInfoDialog(
|
|||
" ", 0, kHeightChanged, 5 * fontWidth, "px");
|
||||
myHeight->setMinValue(TIAConstants::minViewableHeight-1);
|
||||
myHeight->setMaxValue(TIAConstants::maxViewableHeight);
|
||||
myHeight->setTickmarkInterval(4);
|
||||
// one tickmark every ~10 pixel
|
||||
myHeight->setTickmarkInterval((TIAConstants::maxViewableHeight - (TIAConstants::minViewableHeight - 1) + 5) / 10);
|
||||
wid.push_back(myHeight);
|
||||
|
||||
myHeightDetected = new StaticTextWidget(myTab, ifont, myHeight->getRight() + 8, ypos + 5, "100px detected");
|
||||
|
|
|
@ -120,7 +120,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myLauncherWidthSlider->setMinValue(FrameBuffer::kFBMinW);
|
||||
myLauncherWidthSlider->setMaxValue(ds.w);
|
||||
myLauncherWidthSlider->setStepValue(10);
|
||||
myLauncherWidthSlider->setTickmarkInterval(5);
|
||||
// one tickmark every ~100 pixel
|
||||
myLauncherWidthSlider->setTickmarkInterval((ds.w - FrameBuffer::kFBMinW + 50) / 100);
|
||||
wid.push_back(myLauncherWidthSlider);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
|
@ -129,7 +130,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myLauncherHeightSlider->setMinValue(FrameBuffer::kFBMinH);
|
||||
myLauncherHeightSlider->setMaxValue(ds.h);
|
||||
myLauncherHeightSlider->setStepValue(10);
|
||||
myLauncherHeightSlider->setTickmarkInterval(5);
|
||||
// one tickmark every ~100 pixel
|
||||
myLauncherHeightSlider->setTickmarkInterval((ds.h - FrameBuffer::kFBMinH + 50) / 100);
|
||||
wid.push_back(myLauncherHeightSlider);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
|
|
Loading…
Reference in New Issue