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
|
||||||
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 = Gosu::Color.new(0x007a0d71)
|
||||||
@background_two = Gosu::Color.new(0x007b6ead)
|
@background_two = Gosu::Color.new(0x007b6ead)
|
||||||
|
|
||||||
@boot_life = 5_000
|
@boot_life = 5#_000
|
||||||
@boot_started = Gosu.milliseconds
|
@boot_started = Gosu.milliseconds
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,31 @@
|
|||||||
class MainMenu < CyberarmEngine::Container
|
class MainMenu < CyberarmEngine::GameState
|
||||||
def setup
|
def setup
|
||||||
show_cursor = true
|
self.show_cursor = true
|
||||||
set_layout_y(10, 20)
|
|
||||||
|
|
||||||
flow(width: $window.width, padding: 10, margin: 10) do
|
stack do
|
||||||
image("assets/logo_small.png")
|
background 0xff7a0d71
|
||||||
text "Main Menu", align: "center", size: 30
|
flow(padding: 10, margin: 10) do
|
||||||
end
|
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
|
||||||
button("Play")
|
background Gosu::Color::RED
|
||||||
button("About")
|
|
||||||
button("Exit") do
|
label "I-MIC RTS", text_size: 10
|
||||||
close
|
|
||||||
|
button("Play")
|
||||||
|
button("About")
|
||||||
|
button("Exit") do
|
||||||
|
$window.close
|
||||||
|
end
|
||||||
|
|
||||||
|
check_box do |check|
|
||||||
|
puts "Hello World: #{check.value}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def draw
|
|
||||||
fill(Gosu::Color.new(0xff7a0d71))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user