mirror of https://github.com/stella-emu/stella.git
minimized ContextMenu redraws
fixed shading caused by ContextMenu
This commit is contained in:
parent
090c480e1a
commit
3f6895126d
|
@ -346,8 +346,12 @@ int ContextMenu::findItem(int x, int y) const
|
|||
void ContextMenu::drawCurrentSelection(int item)
|
||||
{
|
||||
// Change selection
|
||||
_selectedOffset = item;
|
||||
setDirty();
|
||||
if(_selectedOffset != item)
|
||||
{
|
||||
_selectedOffset = item;
|
||||
cerr << "ContextMenu" << endl;
|
||||
setDirty();
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -240,7 +240,15 @@ void Dialog::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)
|
||||
{
|
||||
|
@ -432,6 +440,7 @@ void Dialog::drawDialog()
|
|||
|| (parent().myDialogStack.get(parent().myDialogStack.size() - 2) == this
|
||||
&& !parent().myDialogStack.top()->hasTitle());
|
||||
|
||||
cerr << "on top " << isOnTop() << endl;
|
||||
if(clearsBackground())
|
||||
{
|
||||
// cerr << "Dialog::drawDialog(): w = " << _w << ", h = " << _h << " @ " << &s << endl << endl;
|
||||
|
|
Loading…
Reference in New Issue