mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:23:51 +00:00
Issue #107: moving function implementations from hpp to cpp file
This commit is contained in:
parent
dbac3d2e5f
commit
020fde70b8
2 changed files with 98 additions and 49 deletions
|
@ -743,3 +743,79 @@ void WindowManager::executeInConsole (const std::string& path)
|
||||||
{
|
{
|
||||||
mConsole->executeFile (path);
|
mConsole->executeFile (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WindowManager::wmUpdateFps(float fps, unsigned int triangleCount, unsigned int batchCount)
|
||||||
|
{
|
||||||
|
mFPS = fps;
|
||||||
|
mTriangleCount = triangleCount;
|
||||||
|
mBatchCount = batchCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyGUI::Gui* WindowManager::getGui() const { return mGui; }
|
||||||
|
|
||||||
|
MWGui::DialogueWindow* WindowManager::getDialogueWindow() { return mDialogueWindow; }
|
||||||
|
MWGui::ContainerWindow* WindowManager::getContainerWindow() { return mContainerWindow; }
|
||||||
|
MWGui::InventoryWindow* WindowManager::getInventoryWindow() { return mInventoryWindow; }
|
||||||
|
MWGui::BookWindow* WindowManager::getBookWindow() { return mBookWindow; }
|
||||||
|
MWGui::ScrollWindow* WindowManager::getScrollWindow() { return mScrollWindow; }
|
||||||
|
MWGui::CountDialog* WindowManager::getCountDialog() { return mCountDialog; }
|
||||||
|
MWGui::ConfirmationDialog* WindowManager::getConfirmationDialog() { return mConfirmationDialog; }
|
||||||
|
MWGui::TradeWindow* WindowManager::getTradeWindow() { return mTradeWindow; }
|
||||||
|
MWGui::SpellWindow* WindowManager::getSpellWindow() { return mSpellWindow; }
|
||||||
|
MWGui::Console* WindowManager::getConsole() { return mConsole; }
|
||||||
|
|
||||||
|
bool WindowManager::isAllowed (GuiWindow wnd) const
|
||||||
|
{
|
||||||
|
return mAllowed & wnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowManager::allow (GuiWindow wnd)
|
||||||
|
{
|
||||||
|
mAllowed = (GuiWindow)(mAllowed | wnd);
|
||||||
|
updateVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowManager::disallowAll()
|
||||||
|
{
|
||||||
|
mAllowed = GW_None;
|
||||||
|
updateVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowManager::toggleVisible (GuiWindow wnd)
|
||||||
|
{
|
||||||
|
mShown = (mShown & wnd) ? (GuiWindow) (mShown & ~wnd) : (GuiWindow) (mShown | wnd);
|
||||||
|
updateVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WindowManager::isGuiMode() const
|
||||||
|
{
|
||||||
|
return !mGuiModes.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
MWGui::GuiMode WindowManager::getMode() const
|
||||||
|
{
|
||||||
|
if (mGuiModes.empty())
|
||||||
|
throw std::runtime_error ("getMode() called, but there is no active mode");
|
||||||
|
|
||||||
|
return mGuiModes.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<ESM::Skill::SkillEnum, MWMechanics::Stat<float> > WindowManager::getPlayerSkillValues()
|
||||||
|
{
|
||||||
|
return mPlayerSkillValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<ESM::Attribute::AttributeID, MWMechanics::Stat<int> > WindowManager::getPlayerAttributeValues()
|
||||||
|
{
|
||||||
|
return mPlayerAttributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
WindowManager::SkillList WindowManager::getPlayerMinorSkills()
|
||||||
|
{
|
||||||
|
return mPlayerMinorSkills;
|
||||||
|
}
|
||||||
|
|
||||||
|
WindowManager::SkillList WindowManager::getPlayerMajorSkills()
|
||||||
|
{
|
||||||
|
return mPlayerMajorSkills;
|
||||||
|
}
|
||||||
|
|
|
@ -100,61 +100,34 @@ namespace MWGui
|
||||||
void popGuiMode();
|
void popGuiMode();
|
||||||
void removeGuiMode(GuiMode mode); ///< can be anywhere in the stack
|
void removeGuiMode(GuiMode mode); ///< can be anywhere in the stack
|
||||||
|
|
||||||
GuiMode getMode() const
|
GuiMode getMode() const;
|
||||||
{
|
|
||||||
if (mGuiModes.empty())
|
|
||||||
throw std::runtime_error ("getMode() called, but there is no active mode");
|
|
||||||
return mGuiModes.back();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isGuiMode() const { return !mGuiModes.empty(); }
|
bool isGuiMode() const;
|
||||||
|
|
||||||
void toggleVisible(GuiWindow wnd)
|
void toggleVisible(GuiWindow wnd);
|
||||||
{
|
|
||||||
mShown = (mShown & wnd) ? (GuiWindow) (mShown & ~wnd) : (GuiWindow) (mShown | wnd);
|
|
||||||
updateVisible();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disallow all inventory mode windows
|
// Disallow all inventory mode windows
|
||||||
void disallowAll()
|
void disallowAll();
|
||||||
{
|
|
||||||
mAllowed = GW_None;
|
|
||||||
updateVisible();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow one or more windows
|
// Allow one or more windows
|
||||||
void allow(GuiWindow wnd)
|
void allow(GuiWindow wnd);
|
||||||
{
|
|
||||||
mAllowed = (GuiWindow)(mAllowed | wnd);
|
|
||||||
updateVisible();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isAllowed(GuiWindow wnd) const
|
bool isAllowed(GuiWindow wnd) const;
|
||||||
{
|
|
||||||
return mAllowed & wnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
MWGui::DialogueWindow* getDialogueWindow() {return mDialogueWindow;}
|
MWGui::DialogueWindow* getDialogueWindow();
|
||||||
MWGui::ContainerWindow* getContainerWindow() {return mContainerWindow;}
|
MWGui::ContainerWindow* getContainerWindow();
|
||||||
MWGui::InventoryWindow* getInventoryWindow() {return mInventoryWindow;}
|
MWGui::InventoryWindow* getInventoryWindow();
|
||||||
MWGui::BookWindow* getBookWindow() {return mBookWindow;}
|
MWGui::BookWindow* getBookWindow();
|
||||||
MWGui::ScrollWindow* getScrollWindow() {return mScrollWindow;}
|
MWGui::ScrollWindow* getScrollWindow();
|
||||||
MWGui::CountDialog* getCountDialog() {return mCountDialog;}
|
MWGui::CountDialog* getCountDialog();
|
||||||
MWGui::ConfirmationDialog* getConfirmationDialog() {return mConfirmationDialog;}
|
MWGui::ConfirmationDialog* getConfirmationDialog();
|
||||||
MWGui::TradeWindow* getTradeWindow() {return mTradeWindow;}
|
MWGui::TradeWindow* getTradeWindow();
|
||||||
MWGui::SpellWindow* getSpellWindow() {return mSpellWindow;}
|
MWGui::SpellWindow* getSpellWindow();
|
||||||
MWGui::Console* getConsole() {return mConsole;}
|
MWGui::Console* getConsole();
|
||||||
|
|
||||||
MyGUI::Gui* getGui() const { return mGui; }
|
MyGUI::Gui* getGui() const;
|
||||||
|
|
||||||
void wmUpdateFps(float fps, unsigned int triangleCount, unsigned int batchCount)
|
void wmUpdateFps(float fps, unsigned int triangleCount, unsigned int batchCount);
|
||||||
{
|
|
||||||
mFPS = fps;
|
|
||||||
mTriangleCount = triangleCount;
|
|
||||||
mBatchCount = batchCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
// MWMechanics::DynamicStat<int> getValue(const std::string& id);
|
|
||||||
|
|
||||||
///< Set value for the given ID.
|
///< Set value for the given ID.
|
||||||
void setValue (const std::string& id, const MWMechanics::Stat<int>& value);
|
void setValue (const std::string& id, const MWMechanics::Stat<int>& value);
|
||||||
|
@ -211,10 +184,10 @@ namespace MWGui
|
||||||
|
|
||||||
void onFrame (float frameDuration);
|
void onFrame (float frameDuration);
|
||||||
|
|
||||||
std::map<ESM::Skill::SkillEnum, MWMechanics::Stat<float> > getPlayerSkillValues() { return mPlayerSkillValues; }
|
std::map<ESM::Skill::SkillEnum, MWMechanics::Stat<float> > getPlayerSkillValues();
|
||||||
std::map<ESM::Attribute::AttributeID, MWMechanics::Stat<int> > getPlayerAttributeValues() { return mPlayerAttributes; }
|
std::map<ESM::Attribute::AttributeID, MWMechanics::Stat<int> > getPlayerAttributeValues();
|
||||||
SkillList getPlayerMinorSkills() { return mPlayerMinorSkills; }
|
SkillList getPlayerMinorSkills();
|
||||||
SkillList getPlayerMajorSkills() { return mPlayerMajorSkills; }
|
SkillList getPlayerMajorSkills();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches a GMST string from the store, if there is no setting with the given
|
* Fetches a GMST string from the store, if there is no setting with the given
|
||||||
|
|
Loading…
Reference in a new issue