1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-05-13 21:56:29 +02:00

Fix minor gui issue

This commit is contained in:
Gerkiz 2022-03-29 22:24:58 +02:00
parent da10bf40dc
commit 7cf25ff1c0
4 changed files with 6 additions and 9 deletions

View File

@ -21,7 +21,7 @@ local Public = {}
local screen_elements = {}
local this = {
settings = {
mod_gui_top_frame = false
mod_gui_top_frame = true
}
}
@ -36,8 +36,8 @@ Global.register(
---@param player <userdata>
---@param frame <object>
---@param name <string>
function Public.add_mod_button(player, frame, name)
if Gui.get_button_flow(player)[name] then
function Public.add_mod_button(player, frame)
if Gui.get_button_flow(player)[frame.name] and Gui.get_button_flow(player)[frame.name].valid then
return
end

View File

@ -774,8 +774,7 @@ local function player_joined(event)
name = main_button_name,
sprite = 'item/programmable-speaker',
tooltip = 'Let your question be heard!'
},
'main_button_name'
}
)
else
if player.gui.top[main_button_name] ~= nil then

View File

@ -149,8 +149,7 @@ local function create_main_button(event)
name = main_button_name,
sprite = 'utility/surface_editor_icon',
tooltip = 'Connect to another Comfy server!'
},
main_button_name
}
)
else
local main_button = player.gui.top[main_button_name]

View File

@ -574,8 +574,7 @@ local function create_gui_button(player)
name = 'auto_stash',
sprite = 'item/wooden-chest',
tooltip = tooltip
},
'auto_stash'
}
)
else
local b =