mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
Minimap, hotkeys and lot of other changes
* Begin working on a new layout system for UIMinimap and later UIMap, this new layout system allows to add widgets to the minimap * Add option to disable motd * Rework hotkey binding * Lots of fixes in hotkeys manager * Add fullmap view using Ctrl+Shift+M * Prevent some crashs in ThingType draw * Add function to load minimap from PNG files * Fixes in minimap saving * Fixes in Tile::isClickable * Add UIMapAnchorLayout, new layout for maps * Fix freezes in win32 when pressing alt key
This commit is contained in:
@@ -67,6 +67,11 @@ function connect(object, arg1, arg2, arg3)
|
||||
elseif type(object[signal]) == 'function' then
|
||||
object[signal] = { object[signal] }
|
||||
end
|
||||
|
||||
if type(slot) ~= 'function' then
|
||||
perror(debug.traceback('unable to connect a non function value'))
|
||||
end
|
||||
|
||||
if type(object[signal]) == 'table' then
|
||||
if pushFront then
|
||||
table.insert(object[signal], 1, slot)
|
||||
@@ -80,9 +85,15 @@ end
|
||||
function disconnect(object, arg1, arg2)
|
||||
local signalsAndSlots
|
||||
if type(arg1) == 'string' then
|
||||
if arg2 == nil then
|
||||
object[arg1] = nil
|
||||
return
|
||||
end
|
||||
signalsAndSlots = { [arg1] = arg2 }
|
||||
else
|
||||
elseif type(arg1) == 'table' then
|
||||
signalsAndSlots = arg1
|
||||
else
|
||||
perror(debug.traceback('unable to disconnect'))
|
||||
end
|
||||
|
||||
for signal,slot in pairs(signalsAndSlots) do
|
||||
|
Reference in New Issue
Block a user