mirror of https://github.com/stella-emu/stella.git
highlight focused widget initially
This commit is contained in:
parent
50088b08a5
commit
cdcbf4b079
|
@ -422,9 +422,12 @@ void Dialog::drawDialog()
|
|||
// Draw outlines for focused widgets
|
||||
// Don't change focus, since this will trigger lost and received
|
||||
// focus events
|
||||
if(_focusedWidget)
|
||||
if (_focusedWidget)
|
||||
{
|
||||
_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)
|
||||
tmp->receivedFocus();
|
||||
else
|
||||
else {
|
||||
tmp->_hasFocus = true;
|
||||
tmp->setFlags(Widget::FLAG_HILITED);
|
||||
}
|
||||
|
||||
if (onTop)
|
||||
s.frameRect(x, y, w, h, kWidFrameColor, FrameStyle::Dashed);
|
||||
|
|
Loading…
Reference in New Issue