This commit is contained in:
2019-02-18 17:41:36 -06:00
parent 4db75e5579
commit 969cc2c853
3 changed files with 22 additions and 18 deletions

View File

@@ -16,5 +16,5 @@ class Window < CyberarmEngine::Engine
end end
end end
Window.new(Gosu.screen_width, Gosu.screen_height, true).show # 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/2, Gosu.screen_height/2, false).show

View File

@@ -1,7 +1,5 @@
class Boot < CyberarmEngine::GameState class Boot < CyberarmEngine::GameState
def setup def setup
self.show_cursor = false
@title = Gosu::Font.new(56, name: "Noto Sans Display", bold: true) @title = Gosu::Font.new(56, name: "Noto Sans Display", bold: true)
@text = Gosu::Font.new(18, name: "Noto Sans Thaana", bold: true) @text = Gosu::Font.new(18, name: "Noto Sans Thaana", bold: true)
@name = "I-MIC RTS" @name = "I-MIC RTS"
@@ -67,6 +65,8 @@ class Boot < CyberarmEngine::GameState
end end
def update def update
self.show_cursor = false
@background.alpha+=1 @background.alpha+=1
@background_two.alpha+=1 @background_two.alpha+=1

View File

@@ -21,33 +21,37 @@ class MainMenu < CyberarmEngine::GameState
stack do stack do
image("assets/logo.png", height: 256) do image("assets/logo.png", height: 256) do
pop_state pop_state if last_state
end end
end end
stack do stack do
background Gosu::Color.rgba(50, 50, 50, 200) background Gosu::Color.rgba(50, 50, 50, 200)
label "Username" 1.times do
@username = edit_line "" label "Username"
label "Password" @username = edit_line ""
@password = edit_line "", type: :password label "Password"
@password = edit_line "", type: :password
flow do flow do
button "Log In" do button "Log In" do
push_state(Boot) push_state(Boot)
puts "Logging in... #{@username.value}:#{Base64.encode64(@password.value)}" puts "Logging in... #{@username.value}:#{Base64.encode64(@password.value)}"
end
button "Sign Up"
check_box checked: true
end end
button "Sign Up"
check_box checked: true
end end
end end
end end
end end
$window.width = @root_container.children.first.width.to_i $window.width = Gosu.screen_width/2
$window.height = @root_container.children.first.height.to_i $window.height = Gosu.screen_height/2
$window.fullscreen = false $window.fullscreen = false
@root_container.recalculate
end end
end end