mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Change cursor on textedit, remove possibility to close EnterGame window
This commit is contained in:
@@ -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)
|
||||
|
@@ -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()
|
||||
|
BIN
modules/client_skins/skins/default/cursors/text.png
Normal file
BIN
modules/client_skins/skins/default/cursors/text.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 964 B |
@@ -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)
|
||||
|
Reference in New Issue
Block a user