mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 07:26:49 +01:00
replace require with dofile, rename Hotkeys to Keyboard
This commit is contained in:
@@ -32,7 +32,7 @@ local function onUseWithMouseRelease(self, mousePosition, mouseButton)
|
||||
end
|
||||
end
|
||||
Game.selectedThing = nil
|
||||
restoreCursor()
|
||||
Mouse.restoreCursor()
|
||||
self:ungrabMouse()
|
||||
return true
|
||||
end
|
||||
@@ -41,7 +41,7 @@ end
|
||||
function Game.startUseWith(thing)
|
||||
Game.selectedThing = thing
|
||||
m_mouseGrabberWidget:grabMouse()
|
||||
setTargetCursor()
|
||||
Mouse.setTargetCursor()
|
||||
end
|
||||
|
||||
function Game.createInterface()
|
||||
@@ -49,15 +49,15 @@ function Game.createInterface()
|
||||
CharacterList.destroyLoadBox()
|
||||
Game.gameUi = displayUI('game.otui')
|
||||
|
||||
--Hotkeys.bindKeyPress('Up', function() Game.walk(North) end)
|
||||
--Hotkeys.bindKeyPress('Down', function() Game.walk(South) end)
|
||||
--Hotkeys.bindKeyPress('Left', function() Game.walk(West) end)
|
||||
--Hotkeys.bindKeyPress('Right', function() Game.walk(East) end)
|
||||
--Keyboard.bindKeyPress('Up', function() Game.walk(North) end)
|
||||
--Keyboard.bindKeyPress('Down', function() Game.walk(South) end)
|
||||
--Keyboard.bindKeyPress('Left', function() Game.walk(West) end)
|
||||
--Keyboard.bindKeyPress('Right', function() Game.walk(East) end)
|
||||
|
||||
Hotkeys.bindKeyPress('Ctrl+Shift+Up', function() Game.forceWalk(North) end)
|
||||
Hotkeys.bindKeyPress('Ctrl+Shift+Down', function() Game.forceWalk(South) end)
|
||||
Hotkeys.bindKeyPress('Ctrl+Shift+Left', function() Game.forceWalk(West) end)
|
||||
Hotkeys.bindKeyPress('Ctrl+Shift+Right', function() Game.forceWalk(East) end)
|
||||
Keyboard.bindKeyPress('Ctrl+Shift+Up', function() Game.forceWalk(North) end)
|
||||
Keyboard.bindKeyPress('Ctrl+Shift+Down', function() Game.forceWalk(South) end)
|
||||
Keyboard.bindKeyPress('Ctrl+Shift+Left', function() Game.forceWalk(West) end)
|
||||
Keyboard.bindKeyPress('Ctrl+Shift+Right', function() Game.forceWalk(East) end)
|
||||
|
||||
rootWidget:moveChildToIndex(Game.gameUi, 1)
|
||||
Game.gameMapPanel = Game.gameUi:getChildById('gameMapPanel')
|
||||
|
||||
@@ -15,8 +15,8 @@ Module
|
||||
- game_containers
|
||||
|
||||
onLoad: |
|
||||
require 'game'
|
||||
require 'thing'
|
||||
require 'creature'
|
||||
require 'player'
|
||||
require 'map'
|
||||
dofile 'game'
|
||||
dofile 'thing'
|
||||
dofile 'creature'
|
||||
dofile 'player'
|
||||
dofile 'map'
|
||||
|
||||
@@ -7,7 +7,7 @@ function UIMap:onDragEnter(mousePos)
|
||||
|
||||
self.parsed = false
|
||||
self.currentDragThing = thing
|
||||
setTargetCursor()
|
||||
Mouse.setTargetCursor()
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ function UIMap:onDragLeave(widget, mousePos)
|
||||
self.currentDragThing = nil
|
||||
end
|
||||
|
||||
restoreCursor()
|
||||
Mouse.restoreCursor()
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user