mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-05-06 09:28:18 +00:00
Tweak theme, stub about dialog
This commit is contained in:
@@ -1,12 +1,45 @@
|
|||||||
module W3DHubLauncher
|
module W3DHubLauncher
|
||||||
module Dialogs
|
module Dialog
|
||||||
class About < CyberarmEngine::GuiState # Dialog
|
class About < CyberarmEngine::Dialog
|
||||||
def setup
|
def setup
|
||||||
# application name and version
|
# application name and version
|
||||||
# authorship
|
# authorship
|
||||||
# special thanks
|
# special thanks
|
||||||
# used gems and libraries
|
# used gems and libraries
|
||||||
# useful links
|
# useful links
|
||||||
|
theme(THEME)
|
||||||
|
background 0xee_222222
|
||||||
|
|
||||||
|
stack(width: 1.0, max_width: 600, height: 1.0, max_height: 600, h_align: :center, v_align: :center, background_nine_slice: NINE_SLICE_ROUNDED, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: 0x88_000000) do
|
||||||
|
flow(width: 1.0, background_nine_slice: NINE_SLICE_ROUNDED_TOP, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: 0xaa_000000) do
|
||||||
|
banner "About", width: 1.0, text_align: :center
|
||||||
|
end
|
||||||
|
|
||||||
|
stack(width: 1.0, fill: true, scroll: true, padding_left: PADDING, padding_right: PADDING) do
|
||||||
|
title NAME
|
||||||
|
para "© 2026 cyberarm", margin_left: PADDING
|
||||||
|
link "MIT licence", margin_left: PADDING
|
||||||
|
|
||||||
|
title "Thanks", margin_top: LARGE_PADDING
|
||||||
|
10.times do
|
||||||
|
tagline "NAME", margin_left: PADDING
|
||||||
|
para "REASON", margin_left: LARGE_PADDING
|
||||||
|
end
|
||||||
|
|
||||||
|
title "Libraries", margin_top: LARGE_PADDING
|
||||||
|
10.times do
|
||||||
|
tagline "LIBRARY", margin_left: PADDING
|
||||||
|
para "LEGAL TEXT", margin_left: LARGE_PADDING
|
||||||
|
link "ABREV licence", margin_left: LARGE_PADDING
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
flow(width: 1.0, background_nine_slice: NINE_SLICE_ROUNDED_BOTTOM, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: 0xaa_000000) do
|
||||||
|
button "Close" do
|
||||||
|
pop_state
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ module W3DHubLauncher
|
|||||||
Inscription: {
|
Inscription: {
|
||||||
text_size: 18
|
text_size: 18
|
||||||
},
|
},
|
||||||
|
Para: {
|
||||||
|
text_size: 20
|
||||||
|
},
|
||||||
Caption: {
|
Caption: {
|
||||||
font: FONT_BOLD
|
font: FONT_BOLD
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ module W3DHubLauncher
|
|||||||
button(safe_get_image("./media/logo.png"), image_height: 1.0, background: 0, border_color: 0, hover: { background: 0 }, active: { background: 0, color: 0xff_ffffff }) do |btn|
|
button(safe_get_image("./media/logo.png"), image_height: 1.0, background: 0, border_color: 0, hover: { background: 0 }, active: { background: 0, color: 0xff_ffffff }) do |btn|
|
||||||
menu(parent: btn) do
|
menu(parent: btn) do
|
||||||
menu_item("Settings")
|
menu_item("Settings")
|
||||||
menu_item("About")
|
menu_item("About") do
|
||||||
|
dialog(Dialog::About)
|
||||||
|
end
|
||||||
menu_item("Exit") do
|
menu_item("Exit") do
|
||||||
window.close
|
window.close
|
||||||
end
|
end
|
||||||
@@ -92,7 +94,7 @@ module W3DHubLauncher
|
|||||||
stack(width: 1.0, fill: true, margin_top: LARGE_PADDING, scroll: true) do
|
stack(width: 1.0, fill: true, margin_top: LARGE_PADDING, scroll: true) do
|
||||||
50.times do |i|
|
50.times do |i|
|
||||||
# friend container
|
# friend container
|
||||||
flow(width: 1.0, height: 48, padding_top: HALF_PADDING, padding_bottom: HALF_PADDING, background_nine_slice: NINE_SLICE_ROUNDED, background_nine_slice_color: 0, hover: { background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: 0x44_000000 }) do
|
flow(width: 1.0, height: 48, padding_top: HALF_PADDING, padding_bottom: HALF_PADDING, background_nine_slice: NINE_SLICE_ROUNDED, background_nine_slice_from_edge: NINE_SLICE_EDGE, background_nine_slice_color: 0, hover: { background_nine_slice_color: 0x44_000000 }) do
|
||||||
# friend avatar container
|
# friend avatar container
|
||||||
stack(width: 48, height: 1.0, margin_left: HALF_PADDING, background_image: rounded_avatar(safe_get_image("./media/default.png"))) do
|
stack(width: 48, height: 1.0, margin_left: HALF_PADDING, background_image: rounded_avatar(safe_get_image("./media/default.png"))) do
|
||||||
stack(width: 12, height: 12, v_align: :bottom, h_align: :right, background_image: safe_get_image("./media/ui/circle_small.png"), background_image_color: 0xff_26a269)
|
stack(width: 12, height: 12, v_align: :bottom, h_align: :right, background_image: safe_get_image("./media/ui/circle_small.png"), background_image_color: 0xff_26a269)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ require_relative "lib/gui_ext"
|
|||||||
require_relative "lib/theme"
|
require_relative "lib/theme"
|
||||||
require_relative "lib/pages/games"
|
require_relative "lib/pages/games"
|
||||||
require_relative "lib/pages/server_browser"
|
require_relative "lib/pages/server_browser"
|
||||||
|
require_relative "lib/dialogs/about"
|
||||||
require_relative "lib/window"
|
require_relative "lib/window"
|
||||||
|
|
||||||
require_relative "lib/worker"
|
require_relative "lib/worker"
|
||||||
|
|||||||
Reference in New Issue
Block a user