mirror of https://github.com/stella-emu/stella.git
developer dialog Horizon enable fix
FLAT_UI fixes for disabled elements
This commit is contained in:
parent
9d93472298
commit
fabf812543
|
@ -978,7 +978,7 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = {
|
|||
0x808080, 0x000000, 0xc0c0c0, 0xe1e1e1, 0x333333, // base
|
||||
0x000000, 0x0078d7, 0x0078d7, 0xffffff, // text
|
||||
0xf0f0f0, 0xffffff, 0x0f0f0f, // elements
|
||||
0xe1e1e1, 0xe5f1fb, 0x202020, 0x000000, // buttons
|
||||
0xe1e1e1, 0xe5f1fb, 0x000000, 0x000000, // buttons
|
||||
0x333333, // checkbox
|
||||
0x808080, 0x0078d7, // scrollbar
|
||||
0x333333, 0x0078d7, // slider
|
||||
|
|
|
@ -328,7 +328,7 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
|
|||
|
||||
int sWidth = font.getMaxCharWidth() * 8;
|
||||
myStateSizeWidget = new SliderWidget(myTab, font, HBORDER + INDENT * 2, ypos - 1, sWidth, lineHeight,
|
||||
"Buffer size ", 0, kSizeChanged);
|
||||
"Buffer size (*) ", 0, kSizeChanged);
|
||||
myStateSizeWidget->setMinValue(20);
|
||||
myStateSizeWidget->setMaxValue(1000);
|
||||
myStateSizeWidget->setStepValue(20);
|
||||
|
@ -363,6 +363,11 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
|
|||
lineHeight, items, "Horizon ~ ", 0, kHorizonChanged);
|
||||
wid.push_back(myStateHorizonWidget);
|
||||
|
||||
// Add message concerning usage
|
||||
const GUI::Font& infofont = instance().frameBuffer().infoFont();
|
||||
ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight() - 10;
|
||||
new StaticTextWidget(myTab, infofont, HBORDER, ypos, "(*) Any size change clears the buffer");
|
||||
|
||||
addToFocusList(wid, myTab, tabID);
|
||||
}
|
||||
|
||||
|
@ -1010,7 +1015,7 @@ void DeveloperDialog::handleSize()
|
|||
myUncompressedWidget->setValue(size);
|
||||
myStateIntervalWidget->setSelectedIndex(interval);
|
||||
myStateHorizonWidget->setSelectedIndex(i);
|
||||
myStateHorizonWidget->setEnabled(size > uncompressed);
|
||||
myStateHorizonWidget->setEnabled(myTimeMachineWidget->getState() && size > uncompressed);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -1023,7 +1028,7 @@ void DeveloperDialog::handleUncompressed()
|
|||
|
||||
if(size < uncompressed)
|
||||
myStateSizeWidget->setValue(uncompressed);
|
||||
myStateHorizonWidget->setEnabled(size > uncompressed);
|
||||
myStateHorizonWidget->setEnabled(myTimeMachineWidget->getState() && size > uncompressed);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -243,11 +243,11 @@ void PopUpWidget::drawWidget(bool hilite)
|
|||
|
||||
// Draw a thin frame around us.
|
||||
s.frameRect(x, _y, w, _h, kColor);
|
||||
s.frameRect(x + w - 16, _y + 1, 15, _h - 2, hilite ? kTextColorHi : kBGColorLo);
|
||||
s.frameRect(x + w - 16, _y + 1, 15, _h - 2, isEnabled() && hilite ? kTextColorHi : kBGColorLo);
|
||||
|
||||
// Fill the background
|
||||
s.fillRect(x + 1, _y + 1, w - 17, _h - 2, kWidColor);
|
||||
s.fillRect(x + w - 15, _y + 2, 13, _h - 4, kBGColorHi);
|
||||
s.fillRect(x + w - 15, _y + 2, 13, _h - 4, isEnabled() && hilite ? kWidColor : kBGColorHi);
|
||||
//s.vLine(x + w - 17, _y, _y + _h - 1, kShadowColor);
|
||||
// Draw an arrow pointing down at the right end to signal this is a dropdown/popup
|
||||
s.drawBitmap(down_arrow, x + w - 13, _y + myArrowsY + 1,
|
||||
|
|
|
@ -84,7 +84,11 @@ void Widget::draw()
|
|||
{
|
||||
x++; y++; w-=2; h-=2;
|
||||
}
|
||||
#ifndef FLAT_UI
|
||||
s.fillRect(x, y, w, h, (_flags & WIDGET_HILITED) ? _bgcolorhi : _bgcolor);
|
||||
#else
|
||||
s.fillRect(x, y, w, h, (_flags & WIDGET_HILITED) && isEnabled() ? _bgcolorhi : _bgcolor);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Draw border
|
||||
|
@ -93,7 +97,7 @@ void Widget::draw()
|
|||
#ifndef FLAT_UI
|
||||
s.box(_x, _y, _w, _h, kColor, kShadowColor);
|
||||
#else
|
||||
s.frameRect(_x, _y, _w, _h, (_flags & WIDGET_HILITED) ? kScrollColorHi : kColor);
|
||||
s.frameRect(_x, _y, _w, _h, (_flags & WIDGET_HILITED) && isEnabled() ? kScrollColorHi : kColor);
|
||||
#endif // !FLAT_UI
|
||||
_x += 4;
|
||||
_y += 4;
|
||||
|
@ -813,7 +817,7 @@ void SliderWidget::drawWidget(bool hilite)
|
|||
isEnabled() ? kTextColor : kColor, TextAlign::Left);
|
||||
|
||||
// Draw the box
|
||||
s.frameRect(_x + _labelWidth, _y, _w - _labelWidth, _h, hilite ? kSliderColorHi : kShadowColor);
|
||||
s.frameRect(_x + _labelWidth, _y, _w - _labelWidth, _h, isEnabled() && hilite ? kSliderColorHi : kShadowColor);
|
||||
// Fill the box
|
||||
s.fillRect(_x + _labelWidth + 1, _y + 1, _w - _labelWidth - 2, _h - 2,
|
||||
!isEnabled() ? kBGColorHi : kWidColor);
|
||||
|
|
Loading…
Reference in New Issue