#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(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); }