Change cursor on textedit, remove possibility to close EnterGame window

This commit is contained in:
Henrique Santiago
2012-08-10 16:26:39 -03:00
parent 24b60bec2e
commit 8753f82fd0
10 changed files with 137 additions and 43 deletions

View File

@@ -37,6 +37,11 @@ function Client.init()
g_window.setIcon(resolvepath('clienticon.png'))
g_keyboard.bindKeyDown('Ctrl+Shift+R', Client.reloadScripts)
local clientVersion = g_settings.getInteger('client-version')
if clientVersion ~= 0 then
g_game.setClientVersion(clientVersion)
end
connect(g_app, { onRun =
function()
-- Play startup music (The Silver Tree, by Mattias Westlund)

View File

@@ -5,7 +5,6 @@ EnterGameWindow
!text: tr('Enter Game')
size: 236 274
@onEnter: EnterGame.doLogin()
@onEscape: EnterGame.hide()
MenuLabel
!text: tr('Account name')
@@ -107,14 +106,6 @@ EnterGameWindow
Button
!text: tr('Ok')
width: 64
anchors.right: next.left
anchors.bottom: parent.bottom
margin-right: 10
@onClick: EnterGame.doLogin()
Button
!text: tr('Cancel')
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
@onClick: EnterGame.hide()
@onClick: EnterGame.doLogin()

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

View File

@@ -1,37 +1,4 @@
-- @docclass
g_mouse = {}
local cursorChanged = false
function g_mouse.setTargetCursor()
g_window.setMouseCursor('/cursors/targetcursor.png', {x=9,y=9})
cursorChanged = true
end
function g_mouse.setHorizontalCursor()
g_window.setMouseCursor('/cursors/horizontal.png', {x=9,y=4})
cursorChanged = true
end
function g_mouse.setVerticalCursor()
g_window.setMouseCursor('/cursors/vertical.png', {x=4,y=9})
cursorChanged = true
end
function g_mouse.restoreCursor()
g_window.restoreMouseCursor()
cursorChanged = false
end
function g_mouse.isCursorChanged()
return cursorChanged
end
function g_mouse.isPressed(button)
if not button then button = MouseLeftButton end
return g_window.isMouseButtonPressed(button)
end
function g_mouse.bindAutoPress(widget, callback, delay, button)
local button = button or MouseLeftButton
connect(widget, { onMousePress = function(widget, mousePos, mouseButton)