mirror of https://github.com/stella-emu/stella.git
minimized ContextMenu redraws
fixed shading caused by ContextMenu
This commit is contained in:
parent
9819118b59
commit
907fc4edf3
|
@ -346,8 +346,12 @@ int ContextMenu::findItem(int x, int y) const
|
||||||
void ContextMenu::drawCurrentSelection(int item)
|
void ContextMenu::drawCurrentSelection(int item)
|
||||||
{
|
{
|
||||||
// Change selection
|
// Change selection
|
||||||
|
if(_selectedOffset != item)
|
||||||
|
{
|
||||||
_selectedOffset = item;
|
_selectedOffset = item;
|
||||||
|
cerr << "ContextMenu" << endl;
|
||||||
setDirty();
|
setDirty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -240,7 +240,15 @@ void Dialog::render()
|
||||||
surface->render();
|
surface->render();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(parent().myDialogStack.top() != this)
|
|
||||||
|
//cerr << "is ContextMenu "
|
||||||
|
// << (typeid(*parent().myDialogStack.top()) == typeid(ContextMenu)) << endl;
|
||||||
|
|
||||||
|
// Dialog is still on top if e.g a ContextMenu is opened
|
||||||
|
if(!(parent().myDialogStack.top() == this)
|
||||||
|
&& !((parent().myDialogStack.get(parent().myDialogStack.size() - 2) == this
|
||||||
|
//&& !(typeid(*parent().myDialogStack.top()) == typeid(ContextMenu)))
|
||||||
|
&& !parent().myDialogStack.top()->hasTitle())))
|
||||||
{
|
{
|
||||||
if(_shadeSurface == nullptr)
|
if(_shadeSurface == nullptr)
|
||||||
{
|
{
|
||||||
|
@ -432,6 +440,7 @@ void Dialog::drawDialog()
|
||||||
|| (parent().myDialogStack.get(parent().myDialogStack.size() - 2) == this
|
|| (parent().myDialogStack.get(parent().myDialogStack.size() - 2) == this
|
||||||
&& !parent().myDialogStack.top()->hasTitle());
|
&& !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;
|
||||||
|
|
Loading…
Reference in New Issue