Skip to content

Commit

Permalink
Compound panel doesn't take up half the screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCreator-- authored and Moopli committed Jul 30, 2016
1 parent dde3dc0 commit 194d063
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions scripts/microbe_editor/microbe_editor_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 6 additions & 4 deletions scripts/microbe_stage/microbe_stage_hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 194d063

Please sign in to comment.