1 Commits

Author SHA1 Message Date
a856dd5dd4 Fixed breaking changes from CyberarmEngine styling refactor 2026-03-21 21:14:52 -05:00
3 changed files with 6 additions and 12 deletions

View File

@@ -123,7 +123,6 @@ class W3DHub
background_image_path = Cache.package_path(game.category, game.id, "background.png", "") background_image_path = Cache.package_path(game.category, game.id, "background.png", "")
if File.exist?(background_image_path) if File.exist?(background_image_path)
States::Interface.instance&.instance_variable_get(:"@interface_container")&.style&.background_image = get_image(background_image_path) States::Interface.instance&.instance_variable_get(:"@interface_container")&.style&.background_image = get_image(background_image_path)
States::Interface.instance&.instance_variable_get(:"@interface_container")&.style&.default[:background_image] = get_image(background_image_path)
end end
# Game Stuff # Game Stuff

View File

@@ -271,9 +271,8 @@ class W3DHub
def stylize_selected_server(server_container) def stylize_selected_server(server_container)
server_container.style.background = @selected_color server_container.style.background = @selected_color
server_container.style.default[:background] = @selected_color server_container.style.hover.background = @selected_color
server_container.style.hover[:background] = @selected_color server_container.style.active.background = @selected_color
server_container.style.active[:background] = @selected_color
end end
def reorder_server_list def reorder_server_list
@@ -284,11 +283,11 @@ class W3DHub
end.reverse!.each_with_index do |child, i| end.reverse!.each_with_index do |child, i|
next if @selected_server_container && child == @selected_server_container next if @selected_server_container && child == @selected_server_container
child.style.hover[:background] = 0xaa_555566 child.style.hover.background = 0xaa_555566
child.style.hover[:active] = 0xaa_555588 child.style.active.background = 0xaa_555588
child.style.default[:background] = 0xaa_333333 if i.even? child.style.background = 0xaa_333333 if i.even?
child.style.default[:background] = 0x00_000000 if i.odd? child.style.background = 0x00_000000 if i.odd?
end end
@server_list_container.recalculate @server_list_container.recalculate

View File

@@ -60,25 +60,21 @@ class W3DHub
link I18n.t(:"interface.servers").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do link I18n.t(:"interface.servers").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do
@interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE @interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE
@interface_container.style.default[:background_image] = DEFAULT_BACKGROUND_IMAGE
page(W3DHub::Pages::ServerBrowser) page(W3DHub::Pages::ServerBrowser)
end end
link I18n.t(:"interface.community").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do link I18n.t(:"interface.community").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do
@interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE @interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE
@interface_container.style.default[:background_image] = DEFAULT_BACKGROUND_IMAGE
page(W3DHub::Pages::Community) page(W3DHub::Pages::Community)
end end
link I18n.t(:"interface.downloads").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do link I18n.t(:"interface.downloads").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do
@interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE @interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE
@interface_container.style.default[:background_image] = DEFAULT_BACKGROUND_IMAGE
page(W3DHub::Pages::DownloadManager) page(W3DHub::Pages::DownloadManager)
end end
link I18n.t(:"interface.settings").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do link I18n.t(:"interface.settings").upcase, text_size: 34, font: BOLD_FONT, margin_left: 12 do
@interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE @interface_container.style.background_image = DEFAULT_BACKGROUND_IMAGE
@interface_container.style.default[:background_image] = DEFAULT_BACKGROUND_IMAGE
page(W3DHub::Pages::Settings) page(W3DHub::Pages::Settings)
end end
end end