Version 1.8

This commit is contained in:
OTCv8
2020-01-10 02:29:15 +01:00
parent 2a10e65ec0
commit 26c347d2bc
38 changed files with 531 additions and 792 deletions

View File

@@ -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)