forked from mirror/openmw-tes3mp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
854 B
C++
33 lines
854 B
C++
#include "windowpinnablebase.hpp"
|
|
|
|
#include "exposedwindow.hpp"
|
|
|
|
namespace MWGui
|
|
{
|
|
WindowPinnableBase::WindowPinnableBase(const std::string& parLayout)
|
|
: WindowBase(parLayout), mPinned(false)
|
|
{
|
|
ExposedWindow* window = static_cast<ExposedWindow*>(mMainWidget);
|
|
mPinButton = window->getSkinWidget ("Button");
|
|
|
|
mPinButton->eventMouseButtonClick += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonClicked);
|
|
}
|
|
|
|
void WindowPinnableBase::onPinButtonClicked(MyGUI::Widget* _sender)
|
|
{
|
|
mPinned = !mPinned;
|
|
|
|
if (mPinned)
|
|
mPinButton->changeWidgetSkin ("PinDown");
|
|
else
|
|
mPinButton->changeWidgetSkin ("PinUp");
|
|
|
|
onPinToggled();
|
|
}
|
|
|
|
void WindowPinnableBase::setPinButtonVisible(bool visible)
|
|
{
|
|
mPinButton->setVisible(visible);
|
|
}
|
|
}
|