mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-13 14:52:35 +00:00
Added crude menu
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user