mirror of https://github.com/stella-emu/stella.git
highlight focused widget initially
This commit is contained in:
parent
50088b08a5
commit
cdcbf4b079
|
@ -423,8 +423,11 @@ void Dialog::drawDialog()
|
||||||
// Don't change focus, since this will trigger lost and received
|
// Don't change focus, since this will trigger lost and received
|
||||||
// focus events
|
// focus events
|
||||||
if (_focusedWidget)
|
if (_focusedWidget)
|
||||||
|
{
|
||||||
_focusedWidget = Widget::setFocusForChain(this, getFocusList(),
|
_focusedWidget = Widget::setFocusForChain(this, getFocusList(),
|
||||||
_focusedWidget, 0, false);
|
_focusedWidget, 0, false);
|
||||||
|
_focusedWidget->draw(); // make sure the highlight color is drawn initially
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -284,8 +284,10 @@ Widget* Widget::setFocusForChain(GuiObject* boss, WidgetArray& arr,
|
||||||
|
|
||||||
if(emitFocusEvents)
|
if(emitFocusEvents)
|
||||||
tmp->receivedFocus();
|
tmp->receivedFocus();
|
||||||
else
|
else {
|
||||||
tmp->_hasFocus = true;
|
tmp->_hasFocus = true;
|
||||||
|
tmp->setFlags(Widget::FLAG_HILITED);
|
||||||
|
}
|
||||||
|
|
||||||
if (onTop)
|
if (onTop)
|
||||||
s.frameRect(x, y, w, h, kWidFrameColor, FrameStyle::Dashed);
|
s.frameRect(x, y, w, h, kWidFrameColor, FrameStyle::Dashed);
|
||||||
|
|
Loading…
Reference in New Issue