Finally implemented GameServer#time_elapsed and #time_remaining helper methods, stubbed ApplicationSettings dialog

This commit is contained in:
2026-10-15 00:42:15 -05:00
parent a67c0cf073
commit 936b1ae5d9
8 changed files with 120 additions and 15 deletions

View File

@@ -220,10 +220,14 @@ module W3DHubLauncher
menu(parent: btn) do
menu_item("v#{application.version}", enabled: false, disabled: { color: 0xdd_ffffff }, tip: "Installed application version")
stack(width: 1.0, height: 2, background: 0xff_bbbbbb)
menu_item("Installation Folder", tip: "Open application installation folder:\n#{application.installation_path}")
menu_item("Installation Folder", tip: "Open application installation folder:\n#{application.installation_path}") do
SDL.OpenURL("file://#{application.installation_path}")
end
menu_item("Screenshots Folder", tip: "Open application installation folder:\n#{Dir.home}/Documents/W3D Hub/#{application.id}-#{application.channel}/Screenshots")
stack(width: 1.0, height: 2, background: 0xff_bbbbbb)
menu_item("Application Settings", tip: "Edit application launch options")
menu_item("Application Settings", tip: "Edit application launch options") do
dialog(Dialog::ApplicationSettings, application: application, app: @current_app)
end
if @current_app.servicable?
menu_item("Repair Installation", tip: "Attempt to fix and repair installation") do
Worker::Api.repair_application(@current_app.id, @current_channel.id) do |result, status|

View File

@@ -120,7 +120,7 @@ module W3DHubLauncher
name_label&.value = game_server.name
name_label&.tip = game_server.name
info_label&.value = "#{game_server.channel} • #{game_server.region} • #{game_server.time_elapsed} / #{game_server.match_remaining_time}"
info_label&.value = "#{game_server.channel} • #{game_server.region} • #{game_server.time_elapsed} / #{game_server.time_remaining}"
map_label&.value = game_server.current_map
map_label&.tip = game_server.current_map
players_label&.value = format("%d / %d", game_server.player_count, game_server.max_players)
@@ -161,7 +161,7 @@ module W3DHubLauncher
# server name
caption server.name, tag: :name_label, text_wrap: :none, tip: server.name
# server info
inscription "#{server.channel} • #{server.region} • #{server.time_elapsed} / #{server.match_remaining_time}", tag: :info_label, text_wrap: :none, margin_top: -HALF_PADDING
inscription "#{server.channel} • #{server.region} • #{server.time_elapsed} / #{server.time_remaining}", tag: :info_label, text_wrap: :none, margin_top: -HALF_PADDING
end
end