diff --git a/scripts/microbe_editor/microbe_editor_hud.lua b/scripts/microbe_editor/microbe_editor_hud.lua index d97f8e07276..016bd1c6611 100644 --- a/scripts/microbe_editor/microbe_editor_hud.lua +++ b/scripts/microbe_editor/microbe_editor_hud.lua @@ -94,6 +94,7 @@ function MicrobeEditorHudSystem:init(gameState) self.helpPanel = root:getChild("HelpPanel") root:getChild("HelpButton"):registerEventHandler("Clicked", function() self:helpButtonClicked() end) + self.helpPanel:registerEventHandler("Clicked", function() self:helpButtonClicked() end) -- Set species name and cut it off if it is too long. local name = self.nameLabel:getText() diff --git a/scripts/microbe_stage/microbe_stage_hud.lua b/scripts/microbe_stage/microbe_stage_hud.lua index 361c0499557..46241e793b0 100644 --- a/scripts/microbe_stage/microbe_stage_hud.lua +++ b/scripts/microbe_stage/microbe_stage_hud.lua @@ -24,14 +24,14 @@ function HudSystem:activate() global_if_already_displayed = true end self.helpOpen = true - self.menuOpen = false + self.menuOpen = true self:updateLoadButton(); end function HudSystem:init(gameState) System.init(self, "MicrobeStageHudSystem", gameState) self.rootGUIWindow = gameState:rootGUIWindow() - self.compoundListBox = self.rootGUIWindow:getChild("CompoundsOpen"):getChild("CompoundsLabel") + self.compoundListBox = self.rootGUIWindow:getChild("CompoundsOpen") self.hitpointsBar = self.rootGUIWindow:getChild("HealthPanel"):getChild("LifeBar") self.hitpointsCountLabel = self.hitpointsBar:getChild("NumberLabel") self.nameLabel = self.rootGUIWindow:getChild("SpeciesNamePanel"):getChild("SpeciesNameLabel") @@ -40,19 +40,21 @@ function HudSystem:init(gameState) local loadButton = self.rootGUIWindow:getChild("LoadGameButton") --local collapseButton = self.rootGUIWindow:getChild() collapseButtonClicked local helpButton = self.rootGUIWindow:getChild("HelpButton") + local helpPanel = self.rootGUIWindow:getChild("HelpPanel") self.editorButton = self.rootGUIWindow:getChild("EditorButton") --local returnButton = self.rootGUIWindow:getChild("MenuButton") local compoundButton = self.rootGUIWindow:getChild("CompoundsClosed") - local compoundPanel = self.rootGUIWindow:getChild("CompoundsOpen") + --local compoundPanel = self.rootGUIWindow:getChild("CompoundsOpen") local quitButton = self.rootGUIWindow:getChild("QuitButton") saveButton:registerEventHandler("Clicked", function() self:saveButtonClicked() end) loadButton:registerEventHandler("Clicked", function() self:loadButtonClicked() end) menuButton:registerEventHandler("Clicked", function() self:menuButtonClicked() end) helpButton:registerEventHandler("Clicked", function() self:helpButtonClicked() end) + helpPanel:registerEventHandler("Clicked", function() self:helpButtonClicked() end) self.editorButton:registerEventHandler("Clicked", function() self:editorButtonClicked() end) --returnButton:registerEventHandler("Clicked", returnButtonClicked) compoundButton:registerEventHandler("Clicked", function() self:openCompoundPanel() end) - compoundPanel:registerEventHandler("Clicked", function() self:closeCompoundPanel() end) + --compoundPanel:registerEventHandler("Clicked", function() self:closeCompoundPanel() end) quitButton:registerEventHandler("Clicked", quitButtonClicked) self.rootGUIWindow:getChild("MainMenuButton"):registerEventHandler("Clicked", menuMainMenuClicked) -- in microbe_editor_hud.lua self:updateLoadButton(); diff --git a/scripts/microbe_stage_tutorial/microbe_stage_tutorial_hud.lua b/scripts/microbe_stage_tutorial/microbe_stage_tutorial_hud.lua index 2500d09397b..78082bfbd11 100644 --- a/scripts/microbe_stage_tutorial/microbe_stage_tutorial_hud.lua +++ b/scripts/microbe_stage_tutorial/microbe_stage_tutorial_hud.lua @@ -27,7 +27,8 @@ function MicrobeStageTutorialHudSystem:init(gameState) local quitButton = self.rootGUIWindow:getChild("QuitButton") quitButton:registerEventHandler("Clicked", quitButtonClicked) self.rootGUIWindow:getChild("HelpPanel"):registerEventHandler("Clicked", function() self.tutorialStep = self.tutorialStep + 1 end) - self.compoundListBox = self.rootGUIWindow:getChild("CompoundsOpen"):getChild("CompoundsLabel") + self.compoundListBox = self.rootGUIWindow:getChild("CompoundsOpen") + self.compoundListBox:hide() local editorButton = self.rootGUIWindow:getChild("EditorButton") editorButton:registerEventHandler("Clicked", function() self:editorButtonClicked() end) end