enable skills and vip window on right panel

This commit is contained in:
Eduardo Bart
2011-11-03 10:17:10 -02:00
parent 101f608d40
commit 14ce1c8183
19 changed files with 115 additions and 30 deletions

View File

@@ -30,6 +30,7 @@ void UIWindow::setup()
{
UIWidget::setup();
m_moving = false;
m_freeMove = false;
m_headHeight = 0;
m_titleAlign = Fw::AlignCenter;
}
@@ -69,6 +70,8 @@ void UIWindow::onStyleApply(const OTMLNodePtr& styleNode)
setTitle(node->value());
else if(node->tag() == "head text align")
m_titleAlign = Fw::translateAlignment(node->value());
else if(node->tag() == "free move")
m_freeMove = node->value<bool>();
else if(node->tag() == "onEnter") {
g_lua.loadFunction(node->value(), "@" + node->source() + "[" + node->tag() + "]");
luaSetField(node->tag());
@@ -112,10 +115,12 @@ void UIWindow::onFocusChange(bool focused, Fw::FocusReason reason)
bool UIWindow::onMousePress(const Point& mousePos, Fw::MouseButton button)
{
UIWidgetPtr clickedChild = getChildByPos(mousePos);
if(!clickedChild || clickedChild->isPhantom()) {
m_moving = true;
m_movingReference = mousePos - getRect().topLeft();
if(m_freeMove) {
UIWidgetPtr clickedChild = getChildByPos(mousePos);
if(!clickedChild || clickedChild->isPhantom()) {
m_moving = true;
m_movingReference = mousePos - getRect().topLeft();
}
}
return UIWidget::onMousePress(mousePos, button);
}

View File

@@ -46,6 +46,7 @@ protected:
private:
std::string m_title;
bool m_moving;
bool m_freeMove;
Point m_movingReference;
// styling