mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-20 14:43:27 +02:00
Version 1.8
This commit is contained in:
@@ -23,6 +23,7 @@ function init()
|
||||
g_ui.importStyle("ui/basic.otui")
|
||||
g_ui.importStyle("ui/panels.otui")
|
||||
g_ui.importStyle("ui/config.otui")
|
||||
g_ui.importStyle("ui/icons.otui")
|
||||
|
||||
connect(g_game, {
|
||||
onGameStart = online,
|
||||
@@ -89,14 +90,19 @@ function clear()
|
||||
|
||||
for i, socket in pairs(botWebSockets) do
|
||||
g_http.cancel(socket)
|
||||
botWebSockets[i] = nil
|
||||
end
|
||||
botWebSockets = {}
|
||||
|
||||
for i, widget in pairs(g_ui.getRootWidget():getChildren()) do
|
||||
if widget.botWidget then
|
||||
widget:destroy()
|
||||
end
|
||||
end
|
||||
for i, widget in pairs(modules.game_interface.gameMapPanel:getChildren()) do
|
||||
if widget.botWidget then
|
||||
widget:destroy()
|
||||
end
|
||||
end
|
||||
|
||||
local gameMapPanel = modules.game_interface.getMapPanel()
|
||||
if gameMapPanel then
|
||||
@@ -149,7 +155,8 @@ function refresh()
|
||||
end
|
||||
configList:setCurrentOption(settings[index].config)
|
||||
if configList:getCurrentOption().text ~= settings[index].config then
|
||||
settings[index].enabled = false
|
||||
settings[index].config = configList:getCurrentOption().text
|
||||
settings[index].enabled = false
|
||||
end
|
||||
|
||||
enableButton:setOn(settings[index].enabled)
|
||||
|
Reference in New Issue
Block a user