mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
43d6392921
This ensure pinned window are not displayed in main menu, dialogue and container mode.
24 lines
691 B
C++
24 lines
691 B
C++
#include "window_pinnable_base.hpp"
|
|
|
|
#include "../mwbase/windowmanager.hpp"
|
|
|
|
using namespace MWGui;
|
|
|
|
WindowPinnableBase::WindowPinnableBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager)
|
|
: WindowBase(parLayout, parWindowManager), mPinned(false), mVisible(false)
|
|
{
|
|
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
|
|
t->eventWindowButtonPressed += MyGUI::newDelegate(this, &WindowPinnableBase::onWindowButtonPressed);
|
|
}
|
|
|
|
void WindowPinnableBase::onWindowButtonPressed(MyGUI::Window* sender, const std::string& eventName)
|
|
{
|
|
if ("PinToggle" == eventName)
|
|
{
|
|
mPinned = !mPinned;
|
|
onPinToggled();
|
|
}
|
|
|
|
eventDone(this);
|
|
}
|