Moved processed app icons to cache directory, removed app logos (banners) from media since we now download them and app backgrounds from the api
@@ -36,7 +36,7 @@ class W3DHub
|
||||
background app_color
|
||||
|
||||
flow(width: 0.70, height: 1.0) do
|
||||
image_path = File.exist?("#{GAME_ROOT_PATH}/media/icons/#{task.app_id}.png") ? "#{GAME_ROOT_PATH}/media/icons/#{task.app_id}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
image_path = File.exist?("#{CACHE_PATH}/#{task.app_id}.png") ? "#{CACHE_PATH}/#{task.app_id}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
@application_image = image image_path, height: 1.0
|
||||
|
||||
stack(margin_left: 8, width: 0.75) do
|
||||
|
||||
@@ -85,7 +85,7 @@ class W3DHub
|
||||
padding_left: 4, padding_right: 4, tip: game.name) do
|
||||
background game.color if selected
|
||||
|
||||
image_path = File.exist?("#{GAME_ROOT_PATH}/media/icons/#{game.id}.png") ? "#{GAME_ROOT_PATH}/media/icons/#{game.id}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
image_path = File.exist?("#{CACHE_PATH}/#{game.id}.png") ? "#{CACHE_PATH}/#{game.id}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
image_color = Store.application_manager.installed?(game.id, game.channels.first.id) ? 0xff_ffffff : 0x66_ffffff
|
||||
|
||||
flow(width: 1.0, height: 1.0, margin: 8, background_image: image_path, background_image_color: image_color, background_image_mode: :fill_height) do
|
||||
|
||||
@@ -43,7 +43,7 @@ class W3DHub
|
||||
app = Store.applications.games.find { |a| a.id == app_id.to_s }
|
||||
next unless app
|
||||
|
||||
image_path = File.exist?("#{GAME_ROOT_PATH}/media/icons/#{app_id}.png") ? "#{GAME_ROOT_PATH}/media/icons/#{app_id}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
image_path = File.exist?("#{CACHE_PATH}/#{app.id}.png") ? "#{CACHE_PATH}/#{app.id}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
|
||||
image image_path, tip: "#{app.name}", height: 1.0,
|
||||
border_thickness_bottom: 1, border_color_bottom: 0x00_000000,
|
||||
@@ -534,7 +534,7 @@ class W3DHub
|
||||
end
|
||||
|
||||
def game_icon(server)
|
||||
image_path = File.exist?("#{GAME_ROOT_PATH}/media/icons/#{server.game.nil? ? 'ren' : server.game}.png") ? "#{GAME_ROOT_PATH}/media/icons/#{server.game.nil? ? 'ren' : server.game}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
image_path = File.exist?("#{CACHE_PATH}/#{server.game.nil? ? 'ren' : server.game}.png") ? "#{CACHE_PATH}/#{server.game.nil? ? 'ren' : server.game}.png" : "#{GAME_ROOT_PATH}/media/icons/default_icon.png"
|
||||
|
||||
if server.status.password
|
||||
@server_locked_icons[server.game] ||= Gosu.render(96, 96) do
|
||||
|
||||
@@ -208,6 +208,8 @@ class W3DHub
|
||||
def app_icons
|
||||
return unless Store.applications
|
||||
|
||||
@status_label.value = "Retrieving application icons, this might take a moment..." # I18n.t(:"boot.checking_for_updates")
|
||||
|
||||
packages = []
|
||||
Store.applications.games.each do |app|
|
||||
packages << { category: app.category, subcategory: app.id, name: "#{app.id}.ico", version: "" }
|
||||
@@ -220,7 +222,7 @@ class W3DHub
|
||||
next if package.error?
|
||||
|
||||
path = Cache.package_path(package.category, package.subcategory, package.name, package.version)
|
||||
generated_icon_path = "#{GAME_ROOT_PATH}/media/icons/#{package.subcategory}.png"
|
||||
generated_icon_path = "#{CACHE_PATH}/#{package.subcategory}.png"
|
||||
|
||||
regenerate = false
|
||||
|
||||
@@ -245,6 +247,8 @@ class W3DHub
|
||||
def app_logos_and_backgrounds
|
||||
return unless Store.applications
|
||||
|
||||
@status_label.value = "Retrieving application image assets, this might take a moment..." # I18n.t(:"boot.checking_for_updates")
|
||||
|
||||
packages = []
|
||||
Store.applications.games.each do |app|
|
||||
packages << { category: app.category, subcategory: app.id, name: "logo.png", version: "" }
|
||||
|
||||
|
Before Width: | Height: | Size: 771 KiB |
|
Before Width: | Height: | Size: 795 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 714 KiB |
|
Before Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 477 KiB |
|
Before Width: | Height: | Size: 240 KiB |