mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 14:03:26 +02:00
some fixes in MainWindow move
This commit is contained in:
@@ -1191,7 +1191,10 @@ bool UIWidget::onMousePress(const Point& mousePos, Fw::MouseButton button)
|
||||
} else
|
||||
m_clickTimer.restart();
|
||||
}
|
||||
return callLuaField<bool>("onMousePress", mousePos, button);
|
||||
|
||||
if(hasLuaField("onMousePress"))
|
||||
return callLuaField<bool>("onMousePress", mousePos, button);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool UIWidget::onMouseRelease(const Point& mousePos, Fw::MouseButton button)
|
||||
|
@@ -319,7 +319,7 @@ public:
|
||||
void setPaddingRight(int padding) { m_padding.right = padding; updateLayout(); }
|
||||
void setPaddingBottom(int padding) { m_padding.bottom = padding; updateLayout(); }
|
||||
void setPaddingLeft(int padding) { m_padding.left = padding; updateLayout(); }
|
||||
void setOpacity(float opacity) { m_opacity = opacity; }
|
||||
void setOpacity(float opacity) { m_opacity = std::min(std::max(opacity, 0.0f), 1.0f); }
|
||||
|
||||
int getX() { return m_rect.x(); }
|
||||
int getY() { return m_rect.y(); }
|
||||
|
Reference in New Issue
Block a user