|
|
|
@ -11,6 +11,17 @@ namespace MWGui
|
|
|
|
|
mPinButton = window->getSkinWidget ("Button");
|
|
|
|
|
|
|
|
|
|
mPinButton->eventMouseButtonClick += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonClicked);
|
|
|
|
|
|
|
|
|
|
MyGUI::Button* button = NULL;
|
|
|
|
|
MyGUI::VectorWidgetPtr widgets = window->getSkinWidgetsByName("Action");
|
|
|
|
|
for (MyGUI::VectorWidgetPtr::iterator it = widgets.begin(); it != widgets.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if ((*it)->isUserString("HideWindowOnDoubleClick"))
|
|
|
|
|
button = (*it)->castType<MyGUI::Button>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (button)
|
|
|
|
|
button->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &WindowPinnableBase::onDoubleClick);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowPinnableBase::onPinButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
@ -25,6 +36,11 @@ namespace MWGui
|
|
|
|
|
onPinToggled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowPinnableBase::onDoubleClick(MyGUI::Widget *_sender)
|
|
|
|
|
{
|
|
|
|
|
onTitleDoubleClicked();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowPinnableBase::setPinned(bool pinned)
|
|
|
|
|
{
|
|
|
|
|
if (pinned != mPinned)
|
|
|
|
|