mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 17:22:35 +00:00
More style updates
This commit is contained in:
@@ -7,26 +7,26 @@ class W3DHub
|
|||||||
|
|
||||||
theme W3DHub::THEME
|
theme W3DHub::THEME
|
||||||
|
|
||||||
background 0xaa_444444
|
background 0x88_525252
|
||||||
|
|
||||||
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 256, v_align: :center, h_align: :center, background: 0xff_222222) do
|
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 268, v_align: :center, h_align: :center, background: 0xee_222222) do
|
||||||
# Title bar
|
# Title bar
|
||||||
flow(width: 1.0, height: 32, padding: 8) do
|
flow(width: 1.0, height: 36, padding: 8) do
|
||||||
background 0x88_000000
|
background 0x88_000000
|
||||||
|
|
||||||
# image "#{GAME_ROOT_PATH}/media/ui_icons/export.png", width: 32, align: :center, color: 0xaa_ffffff
|
# image "#{GAME_ROOT_PATH}/media/ui_icons/export.png", width: 32, align: :center, color: 0xaa_ffffff
|
||||||
|
|
||||||
# tagline "<b>#{I18n.t(:"server_browser.direct_connect")}</b>", fill: true, text_align: :center
|
# tagline "<b>#{I18n.t(:"server_browser.direct_connect")}</b>", fill: true, text_align: :center
|
||||||
tagline @game ? "Update Game" : "Add Game", width: 1.0, text_align: :center
|
title @game ? "Update Game" : "Add Game", width: 1.0, text_align: :center, font: BOLD_FONT
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, fill: true, padding_left: 8, padding_right: 8) do
|
stack(width: 1.0, fill: true, padding_left: 8, padding_right: 8) do
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "Game or Mod Title:"
|
para "Game or Mod Title:"
|
||||||
@game_title = edit_line "#{@game&.title}", width: 1.0, fill: true
|
@game_title = edit_line "#{@game&.title}", width: 1.0, fill: true
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "Path to Executable:"
|
para "Path to Executable:"
|
||||||
|
|
||||||
flow(width: 1.0, fill: true) do
|
flow(width: 1.0, fill: true) do
|
||||||
@@ -40,7 +40,7 @@ class W3DHub
|
|||||||
|
|
||||||
flow(fill: true)
|
flow(fill: true)
|
||||||
|
|
||||||
flow(width: 1.0, margin_top: 8, height: 40, padding_bottom: 8) do
|
flow(width: 1.0, margin_top: 8, height: 46, padding_bottom: 8) do
|
||||||
button "Cancel", fill: true, margin_right: 4 do
|
button "Cancel", fill: true, margin_right: 4 do
|
||||||
pop_state
|
pop_state
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,24 +7,24 @@ class W3DHub
|
|||||||
|
|
||||||
theme W3DHub::THEME
|
theme W3DHub::THEME
|
||||||
|
|
||||||
background 0xaa_444444
|
background 0x88_525252
|
||||||
|
|
||||||
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 560, v_align: :center, h_align: :center, background: 0xff_222222) do
|
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 610, v_align: :center, h_align: :center, background: 0xee_222222) do
|
||||||
# Title bar
|
# Title bar
|
||||||
flow(width: 1.0, height: 32, padding: 8) do
|
flow(width: 1.0, height: 36, padding: 8) do
|
||||||
background 0x88_000000
|
background 0x88_000000
|
||||||
|
|
||||||
# tagline "<b>#{I18n.t(:"server_browser.direct_connect")}</b>", fill: true, text_align: :center
|
# tagline "<b>#{I18n.t(:"server_browser.direct_connect")}</b>", fill: true, text_align: :center
|
||||||
tagline @profile ? "Update IRC Profile" : "Add IRC Profile", width: 1.0, fill: true, text_align: :center
|
title @profile ? "Update IRC Profile" : "Add IRC Profile", width: 1.0, fill: true, text_align: :center, font: BOLD_FONT
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, fill: true, padding_left: 8, padding_right: 8) do
|
stack(width: 1.0, fill: true, padding_left: 8, padding_right: 8) do
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "IRC Nickname:"
|
para "IRC Nickname:"
|
||||||
@nickname = edit_line "#{@profile&.nickname}", width: 1.0, fill: true
|
@nickname = edit_line "#{@profile&.nickname}", width: 1.0, fill: true
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
flow(width: 1.0, height: 1.0) do
|
flow(width: 1.0, height: 1.0) do
|
||||||
stack(width: 0.5, height: 1.0) do
|
stack(width: 0.5, height: 1.0) do
|
||||||
para "IRC Username (Optional):"
|
para "IRC Username (Optional):"
|
||||||
@@ -38,7 +38,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66, margin_top: 32) do
|
stack(width: 1.0, height: 72, margin_top: 32) do
|
||||||
flow(width: 1.0, height: 1.0) do
|
flow(width: 1.0, height: 1.0) do
|
||||||
stack(width: 0.75, height: 1.0) do
|
stack(width: 0.75, height: 1.0) do
|
||||||
para "IRC Server IP or Hostname:"
|
para "IRC Server IP or Hostname:"
|
||||||
@@ -52,23 +52,30 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 66, margin_top: 8) do
|
flow(width: 1.0, height: 72, margin_top: 8) do
|
||||||
@server_ssl = check_box "IRC Server Use SSL", checked: @profile&.server_ssl, text_size: 18, width: 0.5, height: 66
|
flow(width: 0.5, height: 1.0) do
|
||||||
@server_verify_ssl = check_box "IRC Verify Server SSL Certificate", checked: @profile ? @profile.server_verify_ssl : true, text_size: 18, width: 0.5, height: 66
|
@server_ssl = toggle_button checked: @profile&.server_ssl, text_size: 18, height: 18
|
||||||
|
para "IRC Server Use SSL", fill: true, text_wrap: :none, margin_left: 8
|
||||||
|
end
|
||||||
|
|
||||||
|
flow(width: 0.5, height: 1.0) do
|
||||||
|
@server_verify_ssl = toggle_button checked: @profile ? @profile.server_verify_ssl : true, text_size: 18, height: 18
|
||||||
|
para "IRC Verify Server SSL Certificate", fill: true, text_wrap: :none, margin_left: 8
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "Brenbot Bot Name:"
|
para "Brenbot Bot Name:"
|
||||||
@bot_username = edit_line "#{@profile&.bot_username}", width: 1.0, fill: true
|
@bot_username = edit_line "#{@profile&.bot_username}", width: 1.0, fill: true
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 66) do
|
flow(width: 1.0, height: 72) do
|
||||||
stack(width: 0.5, height: 66) do
|
stack(width: 0.5, height: 72) do
|
||||||
para "Brenbot Auth Username:"
|
para "Brenbot Auth Username:"
|
||||||
@bot_auth_username = edit_line "#{@profile&.bot_auth_username}", width: 1.0, fill: true
|
@bot_auth_username = edit_line "#{@profile&.bot_auth_username}", width: 1.0, fill: true
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 0.5, height: 66) do
|
stack(width: 0.5, height: 72) do
|
||||||
para "Brenbot Auth Password:"
|
para "Brenbot Auth Password:"
|
||||||
@bot_auth_password = edit_line @profile && @profile.bot_auth_password ? Base64.strict_decode64(@profile.bot_auth_password) : "", width: 1.0, fill: true, type: :password
|
@bot_auth_password = edit_line @profile && @profile.bot_auth_password ? Base64.strict_decode64(@profile.bot_auth_password) : "", width: 1.0, fill: true, type: :password
|
||||||
end
|
end
|
||||||
@@ -76,7 +83,7 @@ class W3DHub
|
|||||||
|
|
||||||
flow(fill: true)
|
flow(fill: true)
|
||||||
|
|
||||||
flow(width: 1.0, margin_top: 8, height: 40, padding_bottom: 8) do
|
flow(width: 1.0, margin_top: 8, height: 46, padding_bottom: 8) do
|
||||||
button "Cancel", fill: true, margin_right: 4 do
|
button "Cancel", fill: true, margin_right: 4 do
|
||||||
pop_state
|
pop_state
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,21 +7,21 @@ class W3DHub
|
|||||||
|
|
||||||
theme W3DHub::THEME
|
theme W3DHub::THEME
|
||||||
|
|
||||||
background 0xaa_444444
|
background 0x88_525252
|
||||||
|
|
||||||
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 256, v_align: :center, h_align: :center, background: 0xff_222222) do
|
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 272, v_align: :center, h_align: :center, background: 0xee_222222) do
|
||||||
# Title bar
|
# Title bar
|
||||||
flow(width: 1.0, height: 32, padding: 8) do
|
flow(width: 1.0, height: 36, padding: 8) do
|
||||||
background 0x88_000000
|
background 0x88_000000
|
||||||
|
|
||||||
# image "#{GAME_ROOT_PATH}/media/ui_icons/export.png", width: 32, align: :center, color: 0xaa_ffffff
|
# image "#{GAME_ROOT_PATH}/media/ui_icons/export.png", width: 32, align: :center, color: 0xaa_ffffff
|
||||||
|
|
||||||
# tagline "<b>#{I18n.t(:"server_browser.direct_connect")}</b>", fill: true, text_align: :center
|
# tagline "<b>#{I18n.t(:"server_browser.direct_connect")}</b>", fill: true, text_align: :center
|
||||||
tagline @server_profile ? "Update Server Profile" : "Add Server Profile", width: 1.0, text_align: :center
|
title @server_profile ? "Update Server Profile" : "Add Server Profile", width: 1.0, text_align: :center, font: BOLD_FONT
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, fill: true, padding_left: 8, padding_right: 8) do
|
stack(width: 1.0, fill: true, padding_left: 8, padding_right: 8) do
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "Server Profile Name:"
|
para "Server Profile Name:"
|
||||||
@server_name = edit_line "#{@server_profile&.name}", width: 1.0, fill: true
|
@server_name = edit_line "#{@server_profile&.name}", width: 1.0, fill: true
|
||||||
@server_name.subscribe(:changed) do |label|
|
@server_name.subscribe(:changed) do |label|
|
||||||
@@ -31,7 +31,7 @@ class W3DHub
|
|||||||
|
|
||||||
flow(fill: true)
|
flow(fill: true)
|
||||||
|
|
||||||
flow(width: 1.0, height: 40, padding_bottom: 8) do
|
flow(width: 1.0, height: 46, padding_bottom: 8) do
|
||||||
button "Cancel", fill: true, margin_right: 4 do
|
button "Cancel", fill: true, margin_right: 4 do
|
||||||
pop_state
|
pop_state
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ class W3DHub
|
|||||||
def setup
|
def setup
|
||||||
body.clear do
|
body.clear do
|
||||||
flow(width: 1.0, height: 1.0, padding: 32) do
|
flow(width: 1.0, height: 1.0, padding: 32) do
|
||||||
background 0xff_252535
|
background 0xaa_25253f
|
||||||
|
|
||||||
stack(width: 0.28)
|
stack(width: 610, height: 380, v_align: :center, h_align: :center) do
|
||||||
|
|
||||||
stack(width: 0.48) do
|
|
||||||
flow(width: 1.0) do
|
flow(width: 1.0) do
|
||||||
stack(width: 0.4)
|
stack(width: 0.4)
|
||||||
image "#{GAME_ROOT_PATH}/media/icons/w3dhub.png", width: 0.20
|
image "#{GAME_ROOT_PATH}/media/icons/w3dhub.png", width: 0.20
|
||||||
@@ -20,14 +18,14 @@ class W3DHub
|
|||||||
@username = edit_line "", width: 0.75, autofocus: true, focus: true
|
@username = edit_line "", width: 0.75, autofocus: true, focus: true
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0) do
|
flow(width: 1.0, margin_top: 8) do
|
||||||
tagline "Password", width: 0.25, text_align: :right
|
tagline "Password", width: 0.25, text_align: :right
|
||||||
@password = edit_line "", width: 0.75, type: :password
|
@password = edit_line "", width: 0.75, type: :password
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0) do
|
flow(width: 1.0) do
|
||||||
tagline "", width: 0.25
|
tagline "", width: 0.25
|
||||||
button "Log In" do |btn|
|
@action_button = button "Log In" do |btn|
|
||||||
@username.enabled = false
|
@username.enabled = false
|
||||||
@password.enabled = false
|
@password.enabled = false
|
||||||
btn.enabled = false
|
btn.enabled = false
|
||||||
@@ -90,6 +88,19 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def button_down(id)
|
||||||
|
case id
|
||||||
|
when Gosu::KB_TAB
|
||||||
|
if @username.focused?
|
||||||
|
window.current_state.request_focus(@password)
|
||||||
|
else
|
||||||
|
window.current_state.request_focus(@username)
|
||||||
|
end
|
||||||
|
when Gosu::KB_ENTER, Gosu::KB_RETURN
|
||||||
|
@action_button.enabled? && @action_button.clicked_left_mouse_button(@action_button, 0, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def populate_account_info
|
def populate_account_info
|
||||||
@host.instance_variable_get(:"@account_container").clear do
|
@host.instance_variable_get(:"@account_container").clear do
|
||||||
flow(fill: true, height: 1.0) do
|
flow(fill: true, height: 1.0) do
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class W3DHub
|
|||||||
|
|
||||||
background 0xaa_525252
|
background 0xaa_525252
|
||||||
|
|
||||||
stack(width: 1.0, max_width: 720, height: 1.0, max_height: 540, v_align: :center, h_align: :center, background: 0xee_222222) do
|
stack(width: 1.0, max_width: 720, height: 1.0, max_height: 576, v_align: :center, h_align: :center, background: 0xee_222222) do
|
||||||
# Title bar
|
# Title bar
|
||||||
flow(width: 1.0, height: 36, padding: 8) do
|
flow(width: 1.0, height: 36, padding: 8) do
|
||||||
background 0x88_000000
|
background 0x88_000000
|
||||||
@@ -20,7 +20,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, fill: true, scroll: true) do
|
stack(width: 1.0, fill: true, scroll: true) do
|
||||||
stack(width: 1.0, height: 66, margin_left: 8, margin_right: 8) do
|
stack(width: 1.0, height: 72, margin_left: 8, margin_right: 8) do
|
||||||
para "Server profiles", text_align: :center, width: 1.0
|
para "Server profiles", text_align: :center, width: 1.0
|
||||||
|
|
||||||
flow(width: 1.0, fill: true) do
|
flow(width: 1.0, fill: true) do
|
||||||
@@ -51,7 +51,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, fill: true, margin_top: 8, padding: 8, border_color: 0xff_111111, border_thickness: 1) do
|
stack(width: 1.0, fill: true, margin_top: 8, padding: 8, border_color: 0xff_111111, border_thickness: 1) do
|
||||||
flow(width: 1.0, height: 66) do
|
flow(width: 1.0, height: 72) do
|
||||||
stack(width: 0.5, height: 1.0) do
|
stack(width: 0.5, height: 1.0) do
|
||||||
para "Nickname:"
|
para "Nickname:"
|
||||||
@server_nickname = edit_line "", width: 1.0, fill: true
|
@server_nickname = edit_line "", width: 1.0, fill: true
|
||||||
@@ -73,7 +73,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 66) do
|
flow(width: 1.0, height: 72) do
|
||||||
stack(width: 0.5, height: 1.0) do
|
stack(width: 0.5, height: 1.0) do
|
||||||
para "Server IP or Hostname:"
|
para "Server IP or Hostname:"
|
||||||
@server_hostname = edit_line "", width: 1.0, fill: true
|
@server_hostname = edit_line "", width: 1.0, fill: true
|
||||||
@@ -95,7 +95,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "Game or Mod:"
|
para "Game or Mod:"
|
||||||
|
|
||||||
flow(width: 1.0, fill: true) do
|
flow(width: 1.0, fill: true) do
|
||||||
@@ -125,7 +125,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "Launch arguments (Optional):"
|
para "Launch arguments (Optional):"
|
||||||
@launch_arguments = edit_line "", width: 1.0, fill: true
|
@launch_arguments = edit_line "", width: 1.0, fill: true
|
||||||
@launch_arguments.subscribe(:changed) do |e|
|
@launch_arguments.subscribe(:changed) do |e|
|
||||||
@@ -135,7 +135,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
stack(width: 1.0, height: 66) do
|
stack(width: 1.0, height: 72) do
|
||||||
para "IRC Profile (Optional):"
|
para "IRC Profile (Optional):"
|
||||||
|
|
||||||
flow(width: 1.0, fill: true) do
|
flow(width: 1.0, fill: true) do
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class W3DHub
|
class W3DHub
|
||||||
class States
|
class States
|
||||||
class GameSettingsDialog < Dialog
|
class GameSettingsDialog < Dialog
|
||||||
BUTTON_STYLE = { text_size: 18, padding_top: 3, padding_bottom: 3, padding_left: 3, padding_right: 3 }
|
BUTTON_STYLE = { text_size: 18, padding_top: 3, padding_bottom: 3, padding_left: 3, padding_right: 3, height: 18 }
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
window.show_cursor = true
|
window.show_cursor = true
|
||||||
@@ -15,7 +15,7 @@ class W3DHub
|
|||||||
|
|
||||||
background 0xaa_525252
|
background 0xaa_525252
|
||||||
|
|
||||||
stack(width: 1.0, max_width: 720, height: 1.0, max_height: 680, v_align: :center, h_align: :center, background: 0xee_222222, border_thickness: 2, border_color: 0xff_444444, padding: 10) do
|
stack(width: 1.0, max_width: 760, height: 1.0, max_height: 720, v_align: :center, h_align: :center, background: 0xee_222222, border_thickness: 2, border_color: 0xee_222222, padding: 10) do
|
||||||
flow(width: 1.0, height: 36, padding: 8) do
|
flow(width: 1.0, height: 36, padding: 8) do
|
||||||
background Store.application_manager.color(@app_id)
|
background Store.application_manager.color(@app_id)
|
||||||
|
|
||||||
@@ -27,49 +27,49 @@ class W3DHub
|
|||||||
stack(width: 0.5, height: 1.0, margin_right: 8) do
|
stack(width: 0.5, height: 1.0, margin_right: 8) do
|
||||||
tagline "General"
|
tagline "General"
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Default to First Person", fill: true, text_wrap: :none
|
para "Default to First Person", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Default to First Person", checked: @game_settings.get_value(:default_to_first_person), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Default to First Person", checked: @game_settings.get_value(:default_to_first_person), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:default_to_first_person, btn.value)
|
@game_settings.set_value(:default_to_first_person, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Background Downloads", fill: true, text_wrap: :none
|
para "Background Downloads", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Background Downloads", checked: @game_settings.get_value(:background_downloads), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Background Downloads", checked: @game_settings.get_value(:background_downloads), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:background_downloads, btn.value)
|
@game_settings.set_value(:background_downloads, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Enable Hints", fill: true, text_wrap: :none
|
para "Enable Hints", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Enable Hints", checked: @game_settings.get_value(:hints_enabled), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Enable Hints", checked: @game_settings.get_value(:hints_enabled), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:hints_enabled, btn.value)
|
@game_settings.set_value(:hints_enabled, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Enable Chat Log", fill: true, text_wrap: :none
|
para "Enable Chat Log", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Enable Chat Log", checked: @game_settings.get_value(:chat_log), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Enable Chat Log", checked: @game_settings.get_value(:chat_log), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:chat_log, btn.value)
|
@game_settings.set_value(:chat_log, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Show FPS", fill: true, text_wrap: :none
|
para "Show FPS", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Show FPS", checked: @game_settings.get_value(:show_fps), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Show FPS", checked: @game_settings.get_value(:show_fps), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:show_fps, btn.value)
|
@game_settings.set_value(:show_fps, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Show Velocity", fill: true, text_wrap: :none
|
para "Show Velocity", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Show Velocity", checked: @game_settings.get_value(:show_velocity), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Show Velocity", checked: @game_settings.get_value(:show_velocity), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:show_velocity, btn.value)
|
@game_settings.set_value(:show_velocity, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Show Damage Numbers", fill: true, text_wrap: :none
|
para "Show Damage Numbers", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Show Damage Numbers", checked: @game_settings.get_value(:show_damage_numbers), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Show Damage Numbers", checked: @game_settings.get_value(:show_damage_numbers), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:show_damage_numbers, btn.value)
|
@game_settings.set_value(:show_damage_numbers, btn.value)
|
||||||
@@ -80,7 +80,7 @@ class W3DHub
|
|||||||
stack(width: 0.5, height: 1.0, margin_left: 8) do
|
stack(width: 0.5, height: 1.0, margin_left: 8) do
|
||||||
tagline "Video"
|
tagline "Video"
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
res_options = @game_settings.get(:resolution_width).options.each_with_index.map do |w, i|
|
res_options = @game_settings.get(:resolution_width).options.each_with_index.map do |w, i|
|
||||||
"#{w[0]}x#{@game_settings.get(:resolution_height).options[i][0]}"
|
"#{w[0]}x#{@game_settings.get(:resolution_height).options[i][0]}"
|
||||||
end
|
end
|
||||||
@@ -96,21 +96,21 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Windowed Mode", fill: true, text_wrap: :none
|
para "Windowed Mode", fill: true, text_wrap: :none
|
||||||
list_box items: @game_settings.get(:windowed_mode).options.map { |v| v[0] }, choose: @game_settings.get_value(:windowed_mode), width: 172, **BUTTON_STYLE do |value|
|
list_box items: @game_settings.get(:windowed_mode).options.map { |v| v[0] }, choose: @game_settings.get_value(:windowed_mode), width: 172, **BUTTON_STYLE do |value|
|
||||||
@game_settings.set_value(:windowed_mode, value)
|
@game_settings.set_value(:windowed_mode, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Enable VSync", fill: true, text_wrap: :none
|
para "Enable VSync", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Enable VSync", checked: @game_settings.get_value(:vsync), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Enable VSync", checked: @game_settings.get_value(:vsync), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:vsync, btn.value)
|
@game_settings.set_value(:vsync, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Anti-aliasing", fill: true, text_wrap: :none
|
para "Anti-aliasing", fill: true, text_wrap: :none
|
||||||
list_box items: @game_settings.get(:anti_aliasing).options.map { |v| v[0] }, choose: @game_settings.get_value(:anti_aliasing), width: 72, **BUTTON_STYLE do |value|
|
list_box items: @game_settings.get(:anti_aliasing).options.map { |v| v[0] }, choose: @game_settings.get_value(:anti_aliasing), width: 72, **BUTTON_STYLE do |value|
|
||||||
@game_settings.set_value(:anti_aliasing, value)
|
@game_settings.set_value(:anti_aliasing, value)
|
||||||
@@ -123,7 +123,7 @@ class W3DHub
|
|||||||
stack(width: 0.5, height: 1.0, margin_right: 8) do
|
stack(width: 0.5, height: 1.0, margin_right: 8) do
|
||||||
tagline "Audio"
|
tagline "Audio"
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Master Volume", fill: true, text_wrap: :none
|
para "Master Volume", fill: true, text_wrap: :none
|
||||||
slider(height: 1.0, width: 172, value: @game_settings.get_value(:master_volume), margin_right: 8).subscribe(:changed) do |slider|
|
slider(height: 1.0, width: 172, value: @game_settings.get_value(:master_volume), margin_right: 8).subscribe(:changed) do |slider|
|
||||||
@game_settings.set_value(:master_volume, slider.value)
|
@game_settings.set_value(:master_volume, slider.value)
|
||||||
@@ -134,7 +134,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Sound Effects", fill: true, text_wrap: :none
|
para "Sound Effects", fill: true, text_wrap: :none
|
||||||
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_effects_volume), margin_right: 8).subscribe(:changed) do |slider|
|
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_effects_volume), margin_right: 8).subscribe(:changed) do |slider|
|
||||||
@game_settings.set_value(:sound_effects_volume, slider.value)
|
@game_settings.set_value(:sound_effects_volume, slider.value)
|
||||||
@@ -145,7 +145,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Dialogue", fill: true, text_wrap: :none
|
para "Dialogue", fill: true, text_wrap: :none
|
||||||
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_dialog_volume), margin_right: 8).subscribe(:changed) do |slider|
|
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_dialog_volume), margin_right: 8).subscribe(:changed) do |slider|
|
||||||
@game_settings.set_value(:sound_dialog_volume, slider.value)
|
@game_settings.set_value(:sound_dialog_volume, slider.value)
|
||||||
@@ -156,7 +156,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Music", fill: true, text_wrap: :none
|
para "Music", fill: true, text_wrap: :none
|
||||||
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_music_volume), margin_right: 8).subscribe(:changed) do |slider|
|
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_music_volume), margin_right: 8).subscribe(:changed) do |slider|
|
||||||
@game_settings.set_value(:sound_music_volume, slider.value)
|
@game_settings.set_value(:sound_music_volume, slider.value)
|
||||||
@@ -167,7 +167,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Cinematic", fill: true, text_wrap: :none
|
para "Cinematic", fill: true, text_wrap: :none
|
||||||
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_cinematic_volume), margin_right: 8).subscribe(:changed) do |slider|
|
slider(height: 1.0, width: 172, value: @game_settings.get_value(:sound_cinematic_volume), margin_right: 8).subscribe(:changed) do |slider|
|
||||||
@game_settings.set_value(:sound_cinematic_volume, slider.value)
|
@game_settings.set_value(:sound_cinematic_volume, slider.value)
|
||||||
@@ -178,7 +178,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Play Sound with Game in Background", fill: true, text_wrap: :none
|
para "Play Sound with Game in Background", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "Play Sound with Game in Background", checked: @game_settings.get_value(:sound_in_background), **BUTTON_STYLE do |btn|
|
toggle_button tip: "Play Sound with Game in Background", checked: @game_settings.get_value(:sound_in_background), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:sound_in_background, btn.value)
|
@game_settings.set_value(:sound_in_background, btn.value)
|
||||||
@@ -189,49 +189,49 @@ class W3DHub
|
|||||||
stack(width: 0.5, height: 1.0, margin_left: 8) do
|
stack(width: 0.5, height: 1.0, margin_left: 8) do
|
||||||
tagline "Performance"
|
tagline "Performance"
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Texture Detail", fill: true, text_wrap: :none
|
para "Texture Detail", fill: true, text_wrap: :none
|
||||||
list_box items: @game_settings.get(:texture_detail).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_detail), width: 172, **BUTTON_STYLE do |value|
|
list_box items: @game_settings.get(:texture_detail).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_detail), width: 172, **BUTTON_STYLE do |value|
|
||||||
@game_settings.set_value(:texture_detail, value)
|
@game_settings.set_value(:texture_detail, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Texture Filtering", fill: true, text_wrap: :none
|
para "Texture Filtering", fill: true, text_wrap: :none
|
||||||
list_box items: @game_settings.get(:texture_filtering).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_filtering), width: 172, **BUTTON_STYLE do |value|
|
list_box items: @game_settings.get(:texture_filtering).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_filtering), width: 172, **BUTTON_STYLE do |value|
|
||||||
@game_settings.set_value(:texture_filtering, value)
|
@game_settings.set_value(:texture_filtering, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
# flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
# para "Shader Detail", fill: true
|
# para "Shader Detail", fill: true
|
||||||
# list_box items: @game_settings.get(:texture_filtering).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_filtering), width: 172, **BUTTON_STYLE do |value|
|
# list_box items: @game_settings.get(:texture_filtering).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_filtering), width: 172, **BUTTON_STYLE do |value|
|
||||||
# @game_settings.set_value(:texture_filtering, value)
|
# @game_settings.set_value(:texture_filtering, value)
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
# flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
# para "Post Processing Detail", fill: true
|
# para "Post Processing Detail", fill: true
|
||||||
# list_box items: @game_settings.get(:texture_filtering).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_filtering), width: 172, **BUTTON_STYLE do |value|
|
# list_box items: @game_settings.get(:texture_filtering).options.map { |v| v[0] }, choose: @game_settings.get_value(:texture_filtering), width: 172, **BUTTON_STYLE do |value|
|
||||||
# @game_settings.set_value(:texture_filtering, value)
|
# @game_settings.set_value(:texture_filtering, value)
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "Shadow Resolution", fill: true, text_wrap: :none
|
para "Shadow Resolution", fill: true, text_wrap: :none
|
||||||
list_box items: @game_settings.get(:shadow_resolution).options.map { |v| v[0] }, choose: @game_settings.get_value(:shadow_resolution), width: 172, **BUTTON_STYLE do |value|
|
list_box items: @game_settings.get(:shadow_resolution).options.map { |v| v[0] }, choose: @game_settings.get_value(:shadow_resolution), width: 172, **BUTTON_STYLE do |value|
|
||||||
@game_settings.set_value(:shadow_resolution, value)
|
@game_settings.set_value(:shadow_resolution, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "High Quality Shadows", fill: true, text_wrap: :none
|
para "High Quality Shadows", fill: true, text_wrap: :none
|
||||||
toggle_button tip: "High Quality Shadows", checked: @game_settings.get_value(:background_downloads), **BUTTON_STYLE do |btn|
|
toggle_button tip: "High Quality Shadows", checked: @game_settings.get_value(:background_downloads), **BUTTON_STYLE do |btn|
|
||||||
@game_settings.set_value(:background_downloads, btn.value)
|
@game_settings.set_value(:background_downloads, btn.value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 24, margin: 4, margin_left: 10) do
|
flow(width: 1.0, height: 28, margin: 4, margin_left: 10) do
|
||||||
para "FPS Limit", fill: true, text_wrap: :none
|
para "FPS Limit", fill: true, text_wrap: :none
|
||||||
list_box items: @game_settings.get(:fps).options.map { |v| v[0] }, choose: @game_settings.get_value(:fps), width: 172, **BUTTON_STYLE do |value|
|
list_box items: @game_settings.get(:fps).options.map { |v| v[0] }, choose: @game_settings.get_value(:fps), width: 172, **BUTTON_STYLE do |value|
|
||||||
@game_settings.set_value(:fps, value.to_i)
|
@game_settings.set_value(:fps, value.to_i)
|
||||||
@@ -241,7 +241,7 @@ class W3DHub
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
flow(width: 1.0, height: 0.1, padding: 8) do
|
flow(width: 1.0, height: 46, padding: 8) do
|
||||||
button "Cancel", width: 0.25 do
|
button "Cancel", width: 0.25 do
|
||||||
pop_state
|
pop_state
|
||||||
@options[:cancel_callback]&.call
|
@options[:cancel_callback]&.call
|
||||||
|
|||||||
29
lib/theme.rb
29
lib/theme.rb
@@ -29,8 +29,8 @@ class W3DHub
|
|||||||
},
|
},
|
||||||
TextBlock: {
|
TextBlock: {
|
||||||
font: REGULAR_FONT,
|
font: REGULAR_FONT,
|
||||||
|
color: 0xff_f2f2f2,
|
||||||
text_static: true,
|
text_static: true,
|
||||||
text_color: 0xff_f2f2f2,
|
|
||||||
text_border: false,
|
text_border: false,
|
||||||
text_shadow: true,
|
text_shadow: true,
|
||||||
text_shadow_size: 1,
|
text_shadow_size: 1,
|
||||||
@@ -61,11 +61,6 @@ class W3DHub
|
|||||||
Inscription: { # < TextBlock
|
Inscription: { # < TextBlock
|
||||||
text_size: 18
|
text_size: 18
|
||||||
},
|
},
|
||||||
EditLine: {
|
|
||||||
border_thickness: 2,
|
|
||||||
border_color: Gosu::Color::WHITE,
|
|
||||||
hover: { color: Gosu::Color::WHITE }
|
|
||||||
},
|
|
||||||
Link: {
|
Link: {
|
||||||
color: 0xff_cdcdcd,
|
color: 0xff_cdcdcd,
|
||||||
hover: {
|
hover: {
|
||||||
@@ -77,6 +72,7 @@ class W3DHub
|
|||||||
},
|
},
|
||||||
Button: {
|
Button: {
|
||||||
font: BOLD_FONT,
|
font: BOLD_FONT,
|
||||||
|
color: 0xff_f2f2f2,
|
||||||
text_size: 22,
|
text_size: 22,
|
||||||
padding_top: 8,
|
padding_top: 8,
|
||||||
padding_left: 16,
|
padding_left: 16,
|
||||||
@@ -86,16 +82,33 @@ class W3DHub
|
|||||||
border_color: Gosu::Color::NONE,
|
border_color: Gosu::Color::NONE,
|
||||||
background: 0xff_0074e0,
|
background: 0xff_0074e0,
|
||||||
hover: {
|
hover: {
|
||||||
text_color: 0xff_f2f2f2,
|
color: 0xff_f2f2f2,
|
||||||
background: 0xff_004c94,
|
background: 0xff_004c94,
|
||||||
border_color: 0xff_0074e0
|
border_color: 0xff_0074e0
|
||||||
},
|
},
|
||||||
active: {
|
active: {
|
||||||
text_color: 0xff_aaaaaa,
|
color: 0xff_aaaaaa,
|
||||||
background: 0xff_005aad,
|
background: 0xff_005aad,
|
||||||
border_color: 0xff_0074e0
|
border_color: 0xff_0074e0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
EditLine: {
|
||||||
|
font: REGULAR_FONT,
|
||||||
|
color: 0xff_f2f2f2,
|
||||||
|
background: 0xff_383838,
|
||||||
|
border_thickness: 2,
|
||||||
|
border_color: 0xff_0074e0,
|
||||||
|
hover: {
|
||||||
|
color: 0xff_f2f2f2,
|
||||||
|
background: 0xff_323232,
|
||||||
|
border_color: 0xff_0074e0
|
||||||
|
},
|
||||||
|
active: {
|
||||||
|
color: 0xff_f2f2f2,
|
||||||
|
background: 0xff_4b4b4b,
|
||||||
|
border_color: 0xff_0074e0
|
||||||
|
}
|
||||||
|
},
|
||||||
ToggleButton: {
|
ToggleButton: {
|
||||||
padding_left: 8,
|
padding_left: 8,
|
||||||
padding_right: 8,
|
padding_right: 8,
|
||||||
|
|||||||
Reference in New Issue
Block a user