This commit is contained in:
2019-02-02 08:53:45 -06:00
parent 0697cc6b53
commit 4db75e5579
3 changed files with 13 additions and 4 deletions

View File

@@ -12,9 +12,9 @@ require_relative "lib/states/main_menu"
class Window < CyberarmEngine::Engine
def setup
self.caption = "I-MIC RTS (#{Gosu.language})"
push_state(Boot)
push_state(MainMenu)
end
end
# Window.new(Gosu.screen_width, Gosu.screen_height, true).show
Window.new(Gosu.screen_width, Gosu.screen_height, false).show
Window.new(Gosu.screen_width, Gosu.screen_height, true).show
# Window.new(Gosu.screen_width, Gosu.screen_height, false).show

View File

@@ -1,5 +1,7 @@
class Boot < CyberarmEngine::GameState
def setup
self.show_cursor = false
@title = Gosu::Font.new(56, name: "Noto Sans Display", bold: true)
@text = Gosu::Font.new(18, name: "Noto Sans Thaana", bold: true)
@name = "I-MIC RTS"
@@ -29,6 +31,10 @@ class Boot < CyberarmEngine::GameState
@background = Gosu::Color.new(0x007a0d71)
@background_two = Gosu::Color.new(0x007b6ead)
$window.width = Gosu.screen_width
$window.height = Gosu.screen_height
$window.fullscreen = true
end
def draw

View File

@@ -10,7 +10,7 @@ class MainMenu < CyberarmEngine::GameState
# background 0xff00aa00
stack do
# background 0xffaa0000
background 0xffaaeedd
# fill Gosu::Color::BLACK
button("Play")
button("About")
@@ -39,6 +39,8 @@ class MainMenu < CyberarmEngine::GameState
puts "Logging in... #{@username.value}:#{Base64.encode64(@password.value)}"
end
button "Sign Up"
check_box checked: true
end
end
end
@@ -46,5 +48,6 @@ class MainMenu < CyberarmEngine::GameState
$window.width = @root_container.children.first.width.to_i
$window.height = @root_container.children.first.height.to_i
$window.fullscreen = false
end
end