Updates are now checked

This commit is contained in:
2021-12-06 09:55:53 -06:00
parent 451f92b9d6
commit a7a5b98955
4 changed files with 31 additions and 4 deletions

View File

@@ -128,8 +128,14 @@ class W3DHub
# background 0xff_551100
if Store.application_manager.installed?(game.id, channel.id)
button "<b>#{I18n.t(:"interface.play_now")}</b>", margin_left: 24 do
Store.application_manager.play_now(game.id, channel.id)
if Store.application_manager.updateable?(game.id, channel.id)
button "<b>#{I18n.t(:"interface.update_now")}</b>", margin_left: 24, background: 0xff_ffac00 do
# Store.application_manager.update(game.id, channel.id)
end
else
button "<b>#{I18n.t(:"interface.play_now")}</b>", margin_left: 24 do
Store.application_manager.play_now(game.id, channel.id)
end
end
button "<b>#{I18n.t(:"interface.single_player")}</b>", margin_left: 24 do

View File

@@ -204,8 +204,9 @@ class W3DHub
stack(width: 1.0, height: 0.25) do
game_installed = Store.application_manager.installed?(server.game, Store.applications.games.find { |g| g.id == server.game }.channels.first.id)
game_updated = Store.application_manager.updateable?(server.game, Store.applications.games.find { |g| g.id == server.game }.channels.first.id)
button "<b>#{I18n.t(:"server_browser.join_server")}</b>", enabled: !game_installed.nil? do
button "<b>#{I18n.t(:"server_browser.join_server")}</b>", enabled: (game_installed && !game_updated) do
# Check for nickname
# prompt for nickname
# !abort unless nickname set