mirror of https://github.com/stella-emu/stella.git
fixed toned down dialogs
This commit is contained in:
parent
8c0b212207
commit
a7308b4c0d
|
@ -44,6 +44,7 @@ class FixedStack
|
|||
bool full() const { return _size >= CAPACITY; }
|
||||
|
||||
T top() const { return _stack[_size - 1]; }
|
||||
T get(uInt32 pos) { return _stack[pos]; };
|
||||
void push(const T& x) { _stack[_size++] = x; }
|
||||
T pop() { return std::move(_stack[--_size]); }
|
||||
uInt32 size() const { return _size; }
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include "Dialog.hxx"
|
||||
#include "Widget.hxx"
|
||||
#include "TabWidget.hxx"
|
||||
|
||||
#include "ContextMenu.hxx"
|
||||
#include "PopUpWidget.hxx"
|
||||
|
||||
#include "Vec.hxx"
|
||||
|
||||
/*
|
||||
|
@ -318,7 +322,10 @@ void Dialog::drawDialog()
|
|||
|
||||
if(_dirty)
|
||||
{
|
||||
bool onTop = parent().myDialogStack.top() == this;
|
||||
// dialog is still on top if e.g a ContextMenu is opened
|
||||
bool onTop = parent().myDialogStack.top() == this
|
||||
|| parent().myDialogStack.get(parent().myDialogStack.size() - 2) == this
|
||||
&& !parent().myDialogStack.top()->hasTitle();
|
||||
|
||||
if(_flags & WIDGET_CLEARBG)
|
||||
{
|
||||
|
|
|
@ -87,6 +87,7 @@ class Dialog : public GuiObject
|
|||
int getFlags() const { return _flags; }
|
||||
|
||||
void setTitle(const string& title);
|
||||
bool hasTitle() { return !_title.empty(); }
|
||||
|
||||
protected:
|
||||
virtual void draw() override { }
|
||||
|
|
Loading…
Reference in New Issue