Prototyped server info panel

This commit is contained in:
2026-09-10 22:51:28 -05:00
parent 7a5667a53a
commit 132d39d3a4

View File

@@ -86,8 +86,142 @@ module W3DHubLauncher
@page_host = stack(fill: true, height: 1.0) do @page_host = stack(fill: true, height: 1.0) do
end end
# server details container
@server_details_container = stack(width: 400, height: 1.0, margin_left: HALF_PADDING, padding: PADDING, background_nine_slice: NINE_SLICE_ROUNDED, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: ALPHA_GRAY) do
tagline "SERVER NAME HERE SERVER NAME HERE SERVER NAME HERE", text_wrap: :none
image safe_get_image("#{ROOT_PATH}/media/default_map_preview.png"), width: 1.0, tip: "MAP NAME APPEARS HERE", margin_bottom: PADDING
flow(width: 1.0) do
stack(fill: true)
button "JOIN", **CTA_BUTTON_THEME
stack(fill: true)
end
stack(width: 1.0, fill: true, scroll: true, margin_top: PADDING) do
# misc. server details
stack(width: 1.0, padding: HALF_PADDING, background_nine_slice: NINE_SLICE_ROUNDED, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: ALPHA_GRAY) do
flow(width: 1.0) do
stack(width: 1.0 / 3) do
caption "Map"
para "TheBacon.mix"
end
stack(width: 1.0 / 3) do
caption "Ping"
para "9945ms"
end
stack(width: 1.0 / 3) do
caption "Players"
para "127/127"
end
end
flow(width: 1.0) do
stack(width: 1.0 / 3) do
caption "Next Map"
para "Bacon.mix"
end
stack(width: 1.0 / 3) do
caption "Time"
para "00:00:00"
end
stack(width: 1.0 / 3) do
caption "Time Left"
para "00:00:00"
end
end
flow(width: 1.0) do
stack(width: 1.0 / 3) do
caption "Region"
para "North America"
end
stack(width: 1.0 / 3) do
caption "Channel"
para "Release"
end
stack(width: 1.0 / 3) do
caption "Version"
para "3.8.1.0"
end
end
end
# team data
2.times do |i|
stack(width: 1.0, margin_top: PADDING, padding: HALF_PADDING, background_nine_slice: NINE_SLICE_ROUNDED, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: ALPHA_GRAY) do
tagline "TEAM #{i}"
flow(width: 1.0) do
stack(width: 1 / 4.0) do
caption "Score"
para "450,000"
end
stack(width: 1 / 4.0) do
caption "Kills"
para "4,500"
end
stack(width: 1 / 4.0) do
caption "Deaths"
para "450"
end
stack(width: 1 / 4.0) do
caption "Players"
para "45/127"
end
end
flow(width: 1.0, height: 2, background: 0xaa_000000)
flow(width: 1.0) do
stack(fill: true) do
caption "Name"
end
stack(width: 1 / 6.0) do
caption "Score"
end
stack(width: 1 / 8.0) do
caption "Kills"
end
stack(width: 1 / 6.0) do
caption "Deaths"
end
stack(width: 1 / 8.0) do
caption "Ping"
end
stack(width: 1 / 6.0) do
caption "Time"
end
end
24.times do |i|
flow(width: 1.0, background: i.odd? ? 0 : 0xaa_000000) do
stack(fill: true, margin_right: HALF_PADDING) do
inscription ["[Dragon]rufeng", "PXD2000", "SteelGhost", "Winter_Spyder", "ChopBam", "cyberarm", "ChAoS", "Silverlight", "moonsense715test", "Name Goes Here Yall"].sample, text_wrap: :none
end
stack(width: 1 / 6.0) do
inscription "5,232", text_wrap: :none
end
stack(width: 1 / 8.0) do
inscription "341", text_wrap: :none
end
stack(width: 1 / 6.0) do
inscription "123", text_wrap: :none
end
stack(width: 1 / 8.0) do
inscription "431", text_wrap: :none
end
stack(width: 1 / 6.0) do
inscription "00:00:00", text_wrap: :none
end
end
end
end
end
end
end
# battleview/friends container # battleview/friends container
@battleview_container = stack(width: 300, height: 1.0, margin_left: LARGE_PADDING, visible: true) do @battleview_container = stack(width: 300, height: 1.0, margin_left: LARGE_PADDING, visible: false) do
# friend management container # friend management container
flow(width: 1.0, height: 60) do flow(width: 1.0, height: 60) do
flow(width: 1.0, v_align: :center) do flow(width: 1.0, v_align: :center) do