mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 21:40:15 +00:00
add ability to check if a window is on the stack (to see if we're in the main menu)
This commit is contained in:
parent
f85679db93
commit
1bf36c686c
@ -88,6 +88,7 @@ namespace MWBase
|
||||
///< can be anywhere in the stack
|
||||
|
||||
virtual MWGui::GuiMode getMode() const = 0;
|
||||
virtual bool containsMode(MWGui::GuiMode) const = 0;
|
||||
|
||||
virtual bool isGuiMode() const = 0;
|
||||
|
||||
|
@ -965,6 +965,14 @@ MWGui::GuiMode WindowManager::getMode() const
|
||||
return mGuiModes.back();
|
||||
}
|
||||
|
||||
bool WindowManager::containsMode(GuiMode mode) const
|
||||
{
|
||||
if(mGuiModes.empty())
|
||||
return false;
|
||||
|
||||
return std::find(mGuiModes.begin(), mGuiModes.end(), mode) != mGuiModes.end();
|
||||
}
|
||||
|
||||
std::map<int, MWMechanics::Stat<float> > WindowManager::getPlayerSkillValues()
|
||||
{
|
||||
return mPlayerSkillValues;
|
||||
|
@ -97,6 +97,7 @@ namespace MWGui
|
||||
virtual void removeGuiMode(GuiMode mode); ///< can be anywhere in the stack
|
||||
|
||||
virtual GuiMode getMode() const;
|
||||
virtual bool containsMode(GuiMode mode) const;
|
||||
|
||||
virtual bool isGuiMode() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user