Added crude menu

This commit is contained in:
2019-01-31 17:33:59 -06:00
parent 22c90ba7af
commit a86ea2fe64
3 changed files with 26 additions and 18 deletions

View File

@@ -14,4 +14,4 @@ class Window < CyberarmEngine::Engine
end
end
Window.new(Gosu.screen_width, Gosu.screen_height, false).show
Window.new(Gosu.screen_width, Gosu.screen_height, true).show

View File

@@ -15,7 +15,7 @@ class Boot < CyberarmEngine::GameState
@background = Gosu::Color.new(0x007a0d71)
@background_two = Gosu::Color.new(0x007b6ead)
@boot_life = 5_000
@boot_life = 5#_000
@boot_started = Gosu.milliseconds
end

View File

@@ -1,23 +1,31 @@
class MainMenu < CyberarmEngine::Container
class MainMenu < CyberarmEngine::GameState
def setup
show_cursor = true
set_layout_y(10, 20)
self.show_cursor = true
flow(width: $window.width, padding: 10, margin: 10) do
image("assets/logo_small.png")
text "Main Menu", align: "center", size: 30
stack do
background 0xff7a0d71
flow(padding: 10, margin: 10) do
background 0xff00ff00
# image("assets/logo_small.png")
label "I-MIC RTS", text_size: 30
label "Main Menu", text_size: 30
end
stack(width: 250) do
stack do
background Gosu::Color::RED
label "I-MIC RTS", text_size: 10
button("Play")
button("About")
button("Exit") do
close
end
end
$window.close
end
def draw
fill(Gosu::Color.new(0xff7a0d71))
check_box do |check|
puts "Hello World: #{check.value}"
end
end
end
end
end