fix useWith mouse conflict with resize borders

This commit is contained in:
Eduardo Bart 2012-03-28 19:25:00 -03:00
parent 5201071707
commit 0e46df3f29
5 changed files with 16 additions and 3 deletions

View File

@ -40,7 +40,9 @@ MainWindow
LineEdit
id: serverHostLineEdit
tooltip: Only protocol 8.6 is supported
tooltip: |-
Make sure that your client uses
the correct game protocol version
anchors.left: serverLabel.left
anchors.right: serverLabel.right
anchors.top: serverLabel.bottom

View File

@ -1,19 +1,29 @@
Mouse = {}
local cursorChanged = true
function Mouse.setTargetCursor()
g_window.setMouseCursor('/core_styles/cursors/targetcursor.png', {x=9,y=9})
cursorChanged = true
end
function Mouse.setHorizontalCursor()
g_window.setMouseCursor('/core_styles/cursors/horizontal.png', {x=9,y=4})
cursorChanged = true
end
function Mouse.setVerticalCursor()
g_window.setMouseCursor('/core_styles/cursors/vertical.png', {x=4,y=9})
cursorChanged = true
end
function Mouse.restoreCursor()
g_window.restoreMouseCursor()
cursorChanged = false
end
function Mouse.isCursorChanged()
return cursorChanged
end
function Mouse.isPressed()

View File

@ -10,7 +10,7 @@ end
function UIResizeBorder:onHoverChange(hovered)
if hovered then
if g_ui.getDraggingWidget() then return end
if Mouse.isCursorChanged() or Mouse.isPressed() then return end
if self:getWidth() > self:getHeight() then
Mouse.setVerticalCursor()
self.vertical = true

View File

@ -9,7 +9,7 @@ end
function UISplitter:onHoverChange(hovered)
if hovered then
if g_ui.getDraggingWidget() then return end
if Mouse.isCursorChanged() or Mouse.isPressed() then return end
if self:getWidth() > self:getHeight() then
Mouse.setVerticalCursor()
self.vertical = true

View File

@ -65,6 +65,7 @@ IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInf
OPTION(CRASH_HANDLER "Generate crash reports" ON)
ELSE()
MESSAGE(STATUS "Debug information: OFF")
OPTION(CRASH_HANDLER "Generate crash reports" OFF)
ENDIF()
IF(CMAKE_BUILD_TYPE STREQUAL "Release")