mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-16 08:02:36 +00:00
Tweak menus a bit, add proper single player menu, made back link have some margin from above links
This commit is contained in:
@@ -13,7 +13,7 @@ class IMICFPS
|
||||
push_state(IMICFPS::MapEditorTool::MainMenu)
|
||||
end
|
||||
|
||||
link I18n.t("menus.back") do
|
||||
link I18n.t("menus.back"), margin_top: 25 do
|
||||
pop_state
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ class IMICFPS
|
||||
push_state(SettingsMenu)
|
||||
end
|
||||
|
||||
link I18n.t("menus.leave") do
|
||||
link I18n.t("menus.leave"), margin_top: 25 do
|
||||
push_state(MainMenu)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ class IMICFPS
|
||||
end
|
||||
end
|
||||
|
||||
link I18n.t("menus.back") do
|
||||
link I18n.t("menus.back"), margin_top: 25 do
|
||||
pop_state
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ class IMICFPS
|
||||
title IMICFPS::NAME
|
||||
|
||||
link I18n.t("menus.singleplayer") do
|
||||
push_state(LevelSelectMenu)
|
||||
push_state(SinglePlayerMenu)
|
||||
end
|
||||
|
||||
link I18n.t("menus.multiplayer") do
|
||||
@@ -21,7 +21,7 @@ class IMICFPS
|
||||
push_state(ExtrasMenu)
|
||||
end
|
||||
|
||||
link I18n.t("menus.quit") do
|
||||
link I18n.t("menus.quit"), margin_top: 25 do
|
||||
window.close
|
||||
end
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class IMICFPS
|
||||
link "Profile" do
|
||||
push_state(MultiplayerProfileMenu)
|
||||
end
|
||||
link I18n.t("menus.back") do
|
||||
link I18n.t("menus.back"), margin_top: 25 do
|
||||
pop_state
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,12 +11,12 @@ class IMICFPS
|
||||
title "Profile"
|
||||
|
||||
flow width: 1.0 do
|
||||
link I18n.t("menus.back"), width: 0.32 do
|
||||
link I18n.t("menus.back"), width: 0.333 do
|
||||
pop_state
|
||||
end
|
||||
|
||||
button "Edit Profile", width: 0.32
|
||||
button "Log Out", width: 0.32
|
||||
button "Edit Profile", width: 0.333
|
||||
button "Log Out", width: 0.333
|
||||
end
|
||||
|
||||
flow(width: 1.0, padding: 4) do
|
||||
@@ -42,7 +42,7 @@ class IMICFPS
|
||||
end
|
||||
|
||||
stack margin_left: 16 do
|
||||
label "0.72"
|
||||
label "0.75"
|
||||
label "21"
|
||||
label "28"
|
||||
label "14"
|
||||
|
||||
@@ -39,12 +39,12 @@ class IMICFPS
|
||||
title "Server Browser"
|
||||
|
||||
flow(width: 1.0) do
|
||||
link I18n.t("menus.back"), width: 0.32 do
|
||||
link I18n.t("menus.back"), width: 0.333 do
|
||||
pop_state
|
||||
end
|
||||
|
||||
button "Host Game", width: 0.32
|
||||
button "Direct Connect", width: 0.32
|
||||
button "Host Game", width: 0.333
|
||||
button "Direct Connect", width: 0.333
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,22 +55,22 @@ class IMICFPS
|
||||
background i.even? ? 0x55000000 : 0x55ff5500
|
||||
|
||||
flow width: 0.1 do
|
||||
label game[:game_type], text_size: text_size
|
||||
label game[:game_type], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.3 do
|
||||
label game[:host], text_size: text_size
|
||||
label game[:host], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.3 do
|
||||
label game[:map], text_size: text_size
|
||||
label game[:map], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.1 do
|
||||
label game[:players], text_size: text_size
|
||||
label game[:players], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.1 do
|
||||
label game[:ping], text_size: text_size
|
||||
label game[:ping], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
flow width: 0.1 do
|
||||
label game[:source], text_size: text_size
|
||||
label game[:source], text_size: text_size, text_wrap: :none, font: i.zero? ? BOLD_SANS_FONT : SANS_FONT
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -94,7 +94,7 @@ class IMICFPS
|
||||
end
|
||||
end
|
||||
|
||||
check_box "Fullscreen", padding_top: 25, padding_bottom: 25
|
||||
check_box "Fullscreen", margin_top: 25, margin_bottom: 25
|
||||
|
||||
stack do
|
||||
longest_string = "Gamma Correction"
|
||||
|
||||
21
lib/ui/menus/single_player_menu.rb
Normal file
21
lib/ui/menus/single_player_menu.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IMICFPS
|
||||
class SinglePlayerMenu < Menu
|
||||
def setup
|
||||
title I18n.t("menus.singleplayer")
|
||||
|
||||
link "Tutorial", enabled: false, tip: "No tutorial implemented, yet..."
|
||||
|
||||
link "Campaign", enabled: false, tip: "No campaign, yet..."
|
||||
|
||||
link "Multiplayer Practice" do
|
||||
push_state(LevelSelectMenu)
|
||||
end
|
||||
|
||||
link I18n.t("menus.back"), margin_top: 25 do
|
||||
pop_state
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user