mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-05-06 09:28:18 +00:00
Tweak layout so that player account info is always in the top right but the 'battleview/friends' container can be hidden
This commit is contained in:
@@ -7,9 +7,9 @@ module W3DHubLauncher
|
|||||||
# root container - background image
|
# root container - background image
|
||||||
stack(width: 1.0, height: 1.0, background_image: safe_get_image("/run/media/cyberarm/Storage/W3DHub/Launcher/package-cache/games/apb/background.png.package"), background_image_mode: :fill) do
|
stack(width: 1.0, height: 1.0, background_image: safe_get_image("/run/media/cyberarm/Storage/W3DHub/Launcher/package-cache/games/apb/background.png.package"), background_image_mode: :fill) do
|
||||||
# root container - background image tint
|
# root container - background image tint
|
||||||
flow(width: 1.0, height: 1.0, background: ALPHA_BLACK) do
|
stack(width: 1.0, height: 1.0, background: ALPHA_BLACK) do
|
||||||
# content container
|
# content container
|
||||||
stack(fill: true, height: 1.0, margin: PADDING, margin_right: LARGE_PADDING) do
|
stack(width: 1.0, fill: true, margin: PADDING) do
|
||||||
# header bar container
|
# header bar container
|
||||||
flow(width: 1.0, height: 80, margin_bottom: PADDING) do |c|
|
flow(width: 1.0, height: 80, margin_bottom: PADDING) do |c|
|
||||||
# logo + menu button
|
# logo + menu button
|
||||||
@@ -36,17 +36,9 @@ module W3DHubLauncher
|
|||||||
end
|
end
|
||||||
stack(fill: true)
|
stack(fill: true)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# page content container
|
|
||||||
@page_host = stack(width: 1.0, fill: true) do
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# battleview/friends container
|
|
||||||
stack(width: 300, height: 1.0, margin: PADDING, margin_left: 0) do
|
|
||||||
# self account container
|
# self account container
|
||||||
flow(width: 1.0, height: 80) do
|
flow(width: 300, height: 80, margin_left: LARGE_PADDING) do
|
||||||
# self avatar container
|
# self avatar container
|
||||||
stack(width: 80, height: 1.0, background_image: rounded_avatar(safe_get_image("#{ROOT_PATH}/media/default.png"))) do
|
stack(width: 80, height: 1.0, background_image: rounded_avatar(safe_get_image("#{ROOT_PATH}/media/default.png"))) do
|
||||||
# self online state container
|
# self online state container
|
||||||
@@ -70,9 +62,18 @@ module W3DHubLauncher
|
|||||||
flow(fill: true)
|
flow(fill: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# layout container
|
||||||
|
flow(width: 1.0, fill: true) do
|
||||||
|
# page host container
|
||||||
|
@page_host = stack(fill: true, height: 1.0) do
|
||||||
|
end
|
||||||
|
|
||||||
|
# battleview/friends container
|
||||||
|
@battleview_container = stack(width: 300, height: 1.0, margin_left: LARGE_PADDING, visible: true) do
|
||||||
# friend management container
|
# friend management container
|
||||||
flow(width: 1.0, height: 60, margin_top: PADDING) do
|
flow(width: 1.0, height: 60) do
|
||||||
flow(width: 1.0, v_align: :center) do
|
flow(width: 1.0, v_align: :center) do
|
||||||
button safe_get_image("#{ROOT_PATH}/media/icons/singleplayer.png"), image_height: 1.0
|
button safe_get_image("#{ROOT_PATH}/media/icons/singleplayer.png"), image_height: 1.0
|
||||||
button safe_get_image("#{ROOT_PATH}/media/icons/gear.png"), image_height: 1.0, margin_left: HALF_PADDING
|
button safe_get_image("#{ROOT_PATH}/media/icons/gear.png"), image_height: 1.0, margin_left: HALF_PADDING
|
||||||
@@ -109,9 +110,17 @@ module W3DHubLauncher
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
page(Page::Games)
|
page(Page::Games)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def button_up(id)
|
||||||
|
super
|
||||||
|
|
||||||
|
@battleview_container.toggle if id == Gosu::KB_F8
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user