|
|
|
@ -12,7 +12,7 @@ namespace MWGui
|
|
|
|
|
ExposedWindow* window = mMainWidget->castType<ExposedWindow>();
|
|
|
|
|
mPinButton = window->getSkinWidget ("Button");
|
|
|
|
|
|
|
|
|
|
mPinButton->eventMouseButtonClick += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonClicked);
|
|
|
|
|
mPinButton->eventMouseButtonPressed += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonPressed);
|
|
|
|
|
|
|
|
|
|
MyGUI::Button* button = NULL;
|
|
|
|
|
MyGUI::VectorWidgetPtr widgets = window->getSkinWidgetsByName("Action");
|
|
|
|
@ -26,8 +26,11 @@ namespace MWGui
|
|
|
|
|
button->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &WindowPinnableBase::onDoubleClick);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowPinnableBase::onPinButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
|
void WindowPinnableBase::onPinButtonPressed(MyGUI::Widget* _sender, int left, int top, MyGUI::MouseButton id)
|
|
|
|
|
{
|
|
|
|
|
if (id != MyGUI::MouseButton::Left)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
mPinned = !mPinned;
|
|
|
|
|
|
|
|
|
|
if (mPinned)
|
|
|
|
@ -46,7 +49,7 @@ namespace MWGui
|
|
|
|
|
void WindowPinnableBase::setPinned(bool pinned)
|
|
|
|
|
{
|
|
|
|
|
if (pinned != mPinned)
|
|
|
|
|
onPinButtonClicked(mPinButton);
|
|
|
|
|
onPinButtonPressed(mPinButton, 0, 0, MyGUI::MouseButton::Left);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WindowPinnableBase::setPinButtonVisible(bool visible)
|
|
|
|
|