mirror of https://github.com/stella-emu/stella.git
removed special colors and drawing for Dialog in background
This commit is contained in:
parent
b4731b1e21
commit
36a3f9843e
|
@ -1326,8 +1326,6 @@ void FrameBuffer::toggleGrabMouse()
|
||||||
kColorInfo TIA output position color
|
kColorInfo TIA output position color
|
||||||
kColorTitleBar Title bar color
|
kColorTitleBar Title bar color
|
||||||
kColorTitleText Title text color
|
kColorTitleText Title text color
|
||||||
kColorTitleBarLo Disabled title bar color
|
|
||||||
kColorTitleTextLo Disabled title text color
|
|
||||||
*/
|
*/
|
||||||
UIPaletteArray FrameBuffer::ourStandardUIPalette = {
|
UIPaletteArray FrameBuffer::ourStandardUIPalette = {
|
||||||
{ 0x686868, 0x000000, 0xa38c61, 0xdccfa5, 0x404040, // base
|
{ 0x686868, 0x000000, 0xa38c61, 0xdccfa5, 0x404040, // base
|
||||||
|
@ -1338,7 +1336,7 @@ UIPaletteArray FrameBuffer::ourStandardUIPalette = {
|
||||||
0xac3410, 0xd55941, // scrollbar
|
0xac3410, 0xd55941, // scrollbar
|
||||||
0xc80000, 0xffff80, 0xc8c8ff, 0xc80000, // debugger
|
0xc80000, 0xffff80, 0xc8c8ff, 0xc80000, // debugger
|
||||||
0xac3410, 0xd55941, 0xdccfa5, 0xf0f0cf, 0xa38c61, // slider
|
0xac3410, 0xd55941, 0xdccfa5, 0xf0f0cf, 0xa38c61, // slider
|
||||||
0xffffff, 0xac3410, 0xf0f0cf, 0x686868, 0xdccfa5 // other
|
0xffffff, 0xac3410, 0xf0f0cf // other
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1351,7 +1349,7 @@ UIPaletteArray FrameBuffer::ourClassicUIPalette = {
|
||||||
0x20a020, 0x00ff00, // scrollbar
|
0x20a020, 0x00ff00, // scrollbar
|
||||||
0xc80000, 0x00ff00, 0xc8c8ff, 0xc80000, // debugger
|
0xc80000, 0x00ff00, 0xc8c8ff, 0xc80000, // debugger
|
||||||
0x20a020, 0x00ff00, 0x404040, 0x686868, 0x404040, // slider
|
0x20a020, 0x00ff00, 0x404040, 0x686868, 0x404040, // slider
|
||||||
0x00ff00, 0x20a020, 0x000000, 0x686868, 0x404040 // other
|
0x00ff00, 0x20a020, 0x000000 // other
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1364,7 +1362,7 @@ UIPaletteArray FrameBuffer::ourLightUIPalette = {
|
||||||
0xc0c0c0, 0x808080, // scrollbar
|
0xc0c0c0, 0x808080, // scrollbar
|
||||||
0xffc0c0, 0x000000, 0xe00000, 0xc00000, // debugger
|
0xffc0c0, 0x000000, 0xe00000, 0xc00000, // debugger
|
||||||
0x333333, 0x0078d7, 0xc0c0c0, 0xffffff, 0xc0c0c0, // slider 0xBDDEF9| 0xe1e1e1 | 0xffffff
|
0x333333, 0x0078d7, 0xc0c0c0, 0xffffff, 0xc0c0c0, // slider 0xBDDEF9| 0xe1e1e1 | 0xffffff
|
||||||
0xffffff, 0x333333, 0xf0f0f0, 0x808080, 0xc0c0c0 // other
|
0xffffff, 0x333333, 0xf0f0f0 // other
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1377,6 +1375,6 @@ UIPaletteArray FrameBuffer::ourDarkUIPalette = {
|
||||||
0x3c3c3c, 0x646464, // scrollbar
|
0x3c3c3c, 0x646464, // scrollbar
|
||||||
0x7f2020, 0xc0c0c0, 0xe00000, 0xc00000, // debugger
|
0x7f2020, 0xc0c0c0, 0xe00000, 0xc00000, // debugger
|
||||||
0x989898, 0x0059a3, 0x3c3c3c, 0x000000, 0x3c3c3c, // slider
|
0x989898, 0x0059a3, 0x3c3c3c, 0x000000, 0x3c3c3c, // slider
|
||||||
0x000000, 0x989898, 0x202020, 0x646464, 0x3c3c3c // other
|
0x000000, 0x989898, 0x202020 // other
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -109,9 +109,7 @@ static constexpr ColorId
|
||||||
kColorInfo = 287,
|
kColorInfo = 287,
|
||||||
kColorTitleBar = 288,
|
kColorTitleBar = 288,
|
||||||
kColorTitleText = 289,
|
kColorTitleText = 289,
|
||||||
kColorTitleBarLo = 290,
|
kNumColors = 290,
|
||||||
kColorTitleTextLo = 291,
|
|
||||||
kNumColors = 292,
|
|
||||||
kNone = 0 // placeholder to represent default/no color
|
kNone = 0 // placeholder to represent default/no color
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -441,26 +441,19 @@ void Dialog::drawDialog()
|
||||||
{
|
{
|
||||||
//cerr << "*** draw dialog " << typeid(*this).name() << " ***" << endl;
|
//cerr << "*** draw dialog " << typeid(*this).name() << " ***" << endl;
|
||||||
|
|
||||||
// Dialog is still on top if e.g a ContextMenu is opened
|
|
||||||
_onTop = true/*parent().myDialogStack.top() == this*/
|
|
||||||
|| (parent().myDialogStack.get(parent().myDialogStack.size() - 2) == this
|
|
||||||
&& !parent().myDialogStack.top()->hasTitle());
|
|
||||||
|
|
||||||
cerr << "on top " << isOnTop() << endl;
|
|
||||||
if(clearsBackground())
|
if(clearsBackground())
|
||||||
{
|
{
|
||||||
// cerr << "Dialog::drawDialog(): w = " << _w << ", h = " << _h << " @ " << &s << endl << endl;
|
// cerr << "Dialog::drawDialog(): w = " << _w << ", h = " << _h << " @ " << &s << endl << endl;
|
||||||
|
|
||||||
if(hasBackground())
|
if(hasBackground())
|
||||||
s.fillRect(_x, _y + _th, _w, _h - _th, _onTop ? kDlgColor : kBGColorLo);
|
s.fillRect(_x, _y + _th, _w, _h - _th, kDlgColor);
|
||||||
else
|
else
|
||||||
s.invalidateRect(_x, _y + _th, _w, _h - _th);
|
s.invalidateRect(_x, _y + _th, _w, _h - _th);
|
||||||
if(_th)
|
if(_th)
|
||||||
{
|
{
|
||||||
s.fillRect(_x, _y, _w, _th, _onTop ? kColorTitleBar : kColorTitleBarLo);
|
s.fillRect(_x, _y, _w, _th, kColorTitleBar);
|
||||||
s.drawString(_font, _title, _x + _font.getMaxCharWidth() * 1.25, _y + _font.getFontHeight() / 6,
|
s.drawString(_font, _title, _x + _font.getMaxCharWidth() * 1.25, _y + _font.getFontHeight() / 6,
|
||||||
_font.getStringWidth(_title),
|
_font.getStringWidth(_title), kColorTitleText);
|
||||||
_onTop ? kColorTitleText : kColorTitleTextLo);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -468,7 +461,7 @@ void Dialog::drawDialog()
|
||||||
cerr << "invalidate " << typeid(*this).name() << endl;
|
cerr << "invalidate " << typeid(*this).name() << endl;
|
||||||
}
|
}
|
||||||
if(hasBorder()) // currently only used by Dialog itself
|
if(hasBorder()) // currently only used by Dialog itself
|
||||||
s.frameRect(_x, _y, _w, _h, _onTop ? kColor : kShadowColor);
|
s.frameRect(_x, _y, _w, _h, kColor);
|
||||||
|
|
||||||
// Make all child widgets dirty
|
// Make all child widgets dirty
|
||||||
Widget::setDirtyInChain(_firstWidget);
|
Widget::setDirtyInChain(_firstWidget);
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Dialog : public GuiObject
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
bool isVisible() const override { return _visible; }
|
bool isVisible() const override { return _visible; }
|
||||||
bool isOnTop() const { return _onTop; }
|
bool isOnTop() const { return true; } // TODO: remove
|
||||||
|
|
||||||
virtual void setPosition();
|
virtual void setPosition();
|
||||||
virtual void drawDialog();
|
virtual void drawDialog();
|
||||||
|
@ -197,7 +197,6 @@ class Dialog : public GuiObject
|
||||||
Widget* _cancelWidget{nullptr};
|
Widget* _cancelWidget{nullptr};
|
||||||
|
|
||||||
bool _visible{false};
|
bool _visible{false};
|
||||||
bool _onTop{true};
|
|
||||||
bool _processCancel{false};
|
bool _processCancel{false};
|
||||||
string _title;
|
string _title;
|
||||||
int _th{0};
|
int _th{0};
|
||||||
|
|
Loading…
Reference in New Issue