mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Fixes to miniwindows
This commit is contained in:
@@ -83,16 +83,19 @@ function Minimap.terminate()
|
||||
end
|
||||
|
||||
function Minimap.toggle()
|
||||
local visible = not minimapWindow:isExplicitlyVisible()
|
||||
if visible then
|
||||
minimapWindow:open()
|
||||
minimapButton:setOn(true)
|
||||
else
|
||||
if minimapButton:isOn() then
|
||||
minimapWindow:close()
|
||||
minimapButton:setOn(false)
|
||||
else
|
||||
minimapWindow:open()
|
||||
minimapButton:setOn(true)
|
||||
end
|
||||
end
|
||||
|
||||
function Minimap.onMiniWindowClose()
|
||||
minimapButton:setOn(false)
|
||||
end
|
||||
|
||||
function Minimap.reset()
|
||||
local player = g_game.getLocalPlayer()
|
||||
if not player then return end
|
||||
|
@@ -3,6 +3,8 @@ MiniWindow
|
||||
!text: tr('Minimap')
|
||||
height: 150
|
||||
icon: minimap.png
|
||||
@onClose: Minimap.onMiniWindowClose()
|
||||
&save: true
|
||||
|
||||
MiniWindowContents
|
||||
padding: 3
|
||||
|
Reference in New Issue
Block a user