Updated MainMenu

This commit is contained in:
2019-06-25 15:30:46 -05:00
parent fed4ee03ed
commit 31d96354f7

View File

@@ -2,16 +2,13 @@ class MainMenu < CyberarmEngine::GuiState
def setup def setup
self.show_cursor = true self.show_cursor = true
background 0xff7a0d71 @container = stack do
stack do background 0xff00aa00
background 0xaabada55
flow do flow do
# background 0xff00aa00
stack do stack(height: 1.0) do
background 0xffaaeedd background Gosu::Color.rgba(50, 50, 50, 200)
# fill Gosu::Color::BLACK
button("Play") button("Play")
button("About") button("About")
button("Exit") do button("Exit") do
@@ -20,7 +17,7 @@ class MainMenu < CyberarmEngine::GuiState
end end
stack do stack do
image("assets/logo.png", height: 250) do image("assets/logo.png", height: 275) do
pop_state if previous_state pop_state if previous_state
end end
end end
@@ -49,10 +46,8 @@ class MainMenu < CyberarmEngine::GuiState
end end
end end
$window.width = @root_container.width $window.width = @container.width
$window.height = @root_container.height $window.height = @container.height
$window.fullscreen = false $window.fullscreen = false
@root_container.recalculate
end end
end end