|
|
|
@ -9,16 +9,13 @@ 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);
|
|
|
|
|
|
|
|
|
|
ExposedWindow* window = static_cast<ExposedWindow*>(mMainWidget);
|
|
|
|
|
mPinButton = window->getSkinWidget ("Button");
|
|
|
|
|
|
|
|
|
|
mPinButton->eventMouseButtonClick += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonClicked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowPinnableBase::onWindowButtonPressed(MyGUI::Window* sender, const std::string& eventName)
|
|
|
|
|
{
|
|
|
|
|
if ("PinToggle" == eventName)
|
|
|
|
|
void WindowPinnableBase::onPinButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
|
{
|
|
|
|
|
mPinned = !mPinned;
|
|
|
|
|
|
|
|
|
@ -29,6 +26,3 @@ void WindowPinnableBase::onWindowButtonPressed(MyGUI::Window* sender, const std:
|
|
|
|
|
|
|
|
|
|
onPinToggled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
eventDone(this);
|
|
|
|
|
}
|
|
|
|
|