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; }
|
bool full() const { return _size >= CAPACITY; }
|
||||||
|
|
||||||
T top() const { return _stack[_size - 1]; }
|
T top() const { return _stack[_size - 1]; }
|
||||||
|
T get(uInt32 pos) { return _stack[pos]; };
|
||||||
void push(const T& x) { _stack[_size++] = x; }
|
void push(const T& x) { _stack[_size++] = x; }
|
||||||
T pop() { return std::move(_stack[--_size]); }
|
T pop() { return std::move(_stack[--_size]); }
|
||||||
uInt32 size() const { return _size; }
|
uInt32 size() const { return _size; }
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
#include "Dialog.hxx"
|
#include "Dialog.hxx"
|
||||||
#include "Widget.hxx"
|
#include "Widget.hxx"
|
||||||
#include "TabWidget.hxx"
|
#include "TabWidget.hxx"
|
||||||
|
|
||||||
|
#include "ContextMenu.hxx"
|
||||||
|
#include "PopUpWidget.hxx"
|
||||||
|
|
||||||
#include "Vec.hxx"
|
#include "Vec.hxx"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -318,7 +322,10 @@ void Dialog::drawDialog()
|
||||||
|
|
||||||
if(_dirty)
|
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)
|
if(_flags & WIDGET_CLEARBG)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,6 +87,7 @@ class Dialog : public GuiObject
|
||||||
int getFlags() const { return _flags; }
|
int getFlags() const { return _flags; }
|
||||||
|
|
||||||
void setTitle(const string& title);
|
void setTitle(const string& title);
|
||||||
|
bool hasTitle() { return !_title.empty(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void draw() override { }
|
virtual void draw() override { }
|
||||||
|
|
Loading…
Reference in New Issue