From 22f973ad845587426794f1651437afab2cefd607 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Mon, 26 Apr 2021 00:33:09 +0100 Subject: [PATCH] Fixed empty top bar flow --- expcore/gui/top_flow.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/expcore/gui/top_flow.lua b/expcore/gui/top_flow.lua index e2cb38c1..3fe60a24 100644 --- a/expcore/gui/top_flow.lua +++ b/expcore/gui/top_flow.lua @@ -91,13 +91,15 @@ Gui.toggle_top_flow(game.player, true) ]] function Gui.toggle_top_flow(player, state) - -- Get the top flow and hide button - local top_flow = Gui.get_top_flow(player) + -- Get the top flow, we need the parent as we want to toggle the outer frame + local top_flow = Gui.get_top_flow(player).parent if state == nil then state = not top_flow.visible end - -- Change the visiblty of the flow + -- Get the show button for the top flow local left_flow = Gui.get_left_flow(player) local show_button = left_flow.gui_core_buttons[show_top_flow] + + -- Change the visibility of the flow and show button show_button.visible = not state top_flow.visible = state