mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-14 07:12:34 +00:00
Moved menus into their own folder, stubbed bunch of menus
This commit is contained in:
48
lib/states/menus/solo_lobby_menu.rb
Normal file
48
lib/states/menus/solo_lobby_menu.rb
Normal file
@@ -0,0 +1,48 @@
|
||||
class IMICRTS
|
||||
class SoloLobbyMenu < CyberarmEngine::GuiState
|
||||
def setup
|
||||
background [0xff7b6ead, 0xff7a0d71, 0xff7a0d71, 0xff7b6ead]
|
||||
|
||||
stack(height: 1.0) do
|
||||
background [0xff555555, Gosu::Color::GRAY]
|
||||
|
||||
label "Lobby", text_size: 78, margin: 20
|
||||
stack do
|
||||
flow do
|
||||
|
||||
elements = [:edit_line, :button, :button, :toggle_button]
|
||||
["Players", "Color", "Team", "Map Preview"].each_with_index do |item, index|
|
||||
stack do
|
||||
label item, background: 0xff7a0d71
|
||||
|
||||
stack do
|
||||
case elements[index]
|
||||
when :edit_line
|
||||
edit_line "Novice"
|
||||
when :button
|
||||
button item
|
||||
when :toggle_button
|
||||
toggle_button
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
stack(height: 100) do
|
||||
end
|
||||
end
|
||||
|
||||
flow do
|
||||
button("Accept", width: 0.4) do
|
||||
push_state(Game)
|
||||
end
|
||||
|
||||
button("Back", width: 0.4, margin_left: 20) do
|
||||
push_state(MainMenu)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user