mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Remove "PinToggle" event from layout file
This commit is contained in:
parent
2dea86bbc7
commit
3dc28baa28
@ -9,26 +9,20 @@ 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)
|
||||
void WindowPinnableBase::onPinButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
if ("PinToggle" == eventName)
|
||||
{
|
||||
mPinned = !mPinned;
|
||||
mPinned = !mPinned;
|
||||
|
||||
if (mPinned)
|
||||
mPinButton->changeWidgetSkin ("PinDown");
|
||||
else
|
||||
mPinButton->changeWidgetSkin ("PinUp");
|
||||
if (mPinned)
|
||||
mPinButton->changeWidgetSkin ("PinDown");
|
||||
else
|
||||
mPinButton->changeWidgetSkin ("PinUp");
|
||||
|
||||
onPinToggled();
|
||||
}
|
||||
|
||||
eventDone(this);
|
||||
onPinToggled();
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace MWGui
|
||||
bool pinned() { return mPinned; }
|
||||
|
||||
private:
|
||||
void onWindowButtonPressed(MyGUI::Window* sender, const std::string& eventName);
|
||||
void onPinButtonClicked(MyGUI::Widget* _sender);
|
||||
|
||||
protected:
|
||||
virtual void onPinToggled() = 0;
|
||||
|
@ -585,9 +585,7 @@
|
||||
<Property key="Scale" value = "1 1 0 0"/>
|
||||
</Child>
|
||||
|
||||
<Child type="Button" skin="PinUp" offset="232 4 19 19" align="ALIGN_RIGHT ALIGN_TOP" name="Button">
|
||||
<Property key="Event" value="PinToggle"/>
|
||||
</Child>
|
||||
<Child type="Button" skin="PinUp" offset="232 4 19 19" align="ALIGN_RIGHT ALIGN_TOP" name="Button"/>
|
||||
</Skin>
|
||||
|
||||
<Skin name = "MW_Dialog" size = "256 54">
|
||||
|
Loading…
x
Reference in New Issue
Block a user