mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
restore some game functionallity
* i'm gradually restoring game functionality with the new modules design, though still a lot to do * you can reload all scripts and modules using Ctrl+R shortcut while playing (finally! this is the reason of all this rework) * a bunch of fixes, but new regression too :P * fix performance issue that could lead freezes in the client in older machines * completely new game module with new design * fix crashs in map render * remove uigame.cpp (now every game input is via lua) * enable DEBUG macro by default, with it you are able to view any possible lua leak while running
This commit is contained in:
@@ -10,10 +10,12 @@ Module
|
||||
dofile 'ext/table'
|
||||
dofile 'ext/string'
|
||||
dofile 'ext/os'
|
||||
|
||||
dofile 'math/point'
|
||||
dofile 'math/size'
|
||||
dofile 'math/color'
|
||||
dofile 'math/rect'
|
||||
|
||||
dofile 'const'
|
||||
dofile 'util'
|
||||
dofile 'globals'
|
||||
@@ -35,8 +37,4 @@ Module
|
||||
dofile 'widgets/uitabbar'
|
||||
dofile 'widgets/uipopupmenu'
|
||||
dofile 'widgets/uiwindow'
|
||||
--dofile 'widgets/uiminiwindow'
|
||||
--dofile 'widgets/uiminiwindowcontainer'
|
||||
dofile 'widgets/uimessagebox'
|
||||
|
||||
|
||||
|
@@ -68,5 +68,3 @@ end
|
||||
function reloadModules()
|
||||
g_modules.reloadModules()
|
||||
end
|
||||
|
||||
|
||||
|
@@ -70,8 +70,8 @@ local function onWidgetKeyDown(widget, keyCode, keyboardModifiers)
|
||||
end
|
||||
|
||||
local function onWidgetKeyPress(widget, keyCode, keyboardModifiers, autoRepeatTicks)
|
||||
local keyComboDesc = determineKeyComboDesc(keyCode, keyboardModifiers)
|
||||
if keyCode == KeyUnknown then return false end
|
||||
local keyComboDesc = determineKeyComboDesc(keyCode, keyboardModifiers)
|
||||
local comboConf = widget.boundKeyPressCombos[keyComboDesc]
|
||||
if comboConf and (autoRepeatTicks >= comboConf.autoRepeatDelay or autoRepeatTicks == 0) and comboConf.callback then
|
||||
comboConf.callback()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Mouse = {}
|
||||
|
||||
function Mouse.setTargetCursor()
|
||||
g_window.setMouseCursor('/core_styles/icons/targetcursor.png', {x=9,y=9})
|
||||
g_window.setMouseCursor('/core_styles/cursors/targetcursor.png', {x=9,y=9})
|
||||
end
|
||||
|
||||
function Mouse.restoreCursor()
|
||||
|
@@ -36,7 +36,8 @@ function UITabBar:addTab(text, panel)
|
||||
tab.tabBar = self
|
||||
tab:setText(text)
|
||||
tab:setWidth(tab:getTextSize().width + tab:getPaddingLeft() + tab:getPaddingRight())
|
||||
connect(tab, { onClick = onTabClick })
|
||||
tab.onClick = onTabClick
|
||||
tab.onDestroy = function() tab.tabPanel:destroy() end
|
||||
|
||||
table.insert(self.tabs, tab)
|
||||
if #self.tabs == 1 then
|
||||
|
Reference in New Issue
Block a user