mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
some fixes in MainWindow move
This commit is contained in:
@@ -8,13 +8,18 @@ Window < UIWindow
|
||||
image-source: /core_styles/images/window.png
|
||||
image-border: 4
|
||||
image-border-top: 20
|
||||
opacity: 1
|
||||
padding-top: 28
|
||||
padding-left: 16
|
||||
padding-right: 16
|
||||
padding-bottom: 16
|
||||
|
||||
$disabled:
|
||||
color: #aaaaaa88
|
||||
|
||||
$pressed:
|
||||
opacity: 0.8
|
||||
|
||||
MainWindow < Window
|
||||
anchors.centerIn: parent
|
||||
|
||||
|
@@ -10,5 +10,6 @@ end
|
||||
function UICheckBox:onMouseRelease(mousePos, mouseButton)
|
||||
if self:isPressed() and self:containsPoint(mousePos) then
|
||||
self:setChecked(not self:isChecked())
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
@@ -10,6 +10,7 @@ function UIMiniWindow:onMousePress(mousePos, mouseButton)
|
||||
if parent:getClassName() ~= 'UIMiniWindowContainer' then
|
||||
self:raise()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function UIMiniWindow:onDragEnter(mousePos)
|
||||
|
@@ -51,9 +51,8 @@ function UIPopupMenu:onMousePress(mousePos, mouseButton)
|
||||
-- clicks outside menu area destroys the menu
|
||||
if not self:containsPoint(mousePos) then
|
||||
self:destroy()
|
||||
return true
|
||||
end
|
||||
return false
|
||||
return true
|
||||
end
|
||||
|
||||
function UIPopupMenu:onKeyPress(keyCode, keyboardModifiers)
|
||||
|
@@ -18,7 +18,8 @@ function UIWindow:onKeyPress(keyCode, keyboardModifiers)
|
||||
end
|
||||
|
||||
function UIWindow:onMousePress(mousePos, mouseButton)
|
||||
|
||||
self:raise()
|
||||
return true
|
||||
end
|
||||
|
||||
function UIWindow:onDragEnter(mousePos)
|
||||
|
Reference in New Issue
Block a user