Initial commit: Stubbed layout replica of official W3D Hub Launcher

This commit is contained in:
2021-11-08 09:39:06 -06:00
commit bbff4b1952
16 changed files with 194 additions and 0 deletions

3
Gemfile Normal file
View File

@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "cyberarm_engine"

21
Gemfile.lock Normal file
View File

@@ -0,0 +1,21 @@
GEM
remote: https://rubygems.org/
specs:
clipboard (1.3.6)
cyberarm_engine (0.19.1)
clipboard (~> 1.3.5)
excon (~> 0.78.0)
gosu (~> 1.1)
gosu_more_drawables (~> 0.3)
excon (0.78.1)
gosu (1.2.0)
gosu_more_drawables (0.3.1)
PLATFORMS
x64-mingw32
DEPENDENCIES
cyberarm_engine
BUNDLED WITH
2.2.28

0
data/.gitkeep Normal file
View File

0
lib/states/boot.rb Normal file
View File

151
lib/states/interface.rb Normal file
View File

@@ -0,0 +1,151 @@
class W3DHub
class States
class Interface < CyberarmEngine::GuiState
def setup
window.show_cursor = true
stack(width: 1.0, height: 1.0) do
@header_container = flow(width: 1.0, height: 0.15, padding: 4) do
background 0xff_888888
image "#{GAME_ROOT_PATH}/media/icons/w3dhub.png", width: 0.11
stack(width: 0.89, height: 1.0) do
background 0xff_885500
@app_info_container = flow(width: 1.0, height: 0.65) do
background 0xff_8855ff
stack(width: 0.75, height: 1.0) do
title "W3D Hub Launcher"
caption "Version 0.13.0.4", margin_left: 32
end
@account_container = flow(width: 0.25, height: 1.0) do
background 0xff_22ff00
stack(width: 0.7, height: 1.0) do
background 0xff_222222
tagline "Cyberarm"
flow(width: 1.0) do
link "Logout", text_size: 14
link "Profile", text_size: 14
end
end
image "#{GAME_ROOT_PATH}/media/icons/ia.png", height: 1.0
end
end
@navigation_container = flow(width: 1.0, height: 0.35) do
background 0xff_666666
flow(width: 0.25, height: 1.0) do
end
flow(width: 0.5, height: 1.0) do
link "Games"
link "Server Browser"
link "Community"
end
flow(width: 0.25, height: 1.0) do
end
end
end
end
@content_container = flow(width: 1.0, height: 0.85) do
background 0xff_44aa00
# Games List
stack(width: 0.15, height: 1.0) do
background 0xff_559900
stack(width: 1.0, border_thickness_left: 4, border_color_left: 0xff_000000) do
background 0xff_663300
image "#{GAME_ROOT_PATH}/media/icons/ren.png", height: 48
inscription "C&C Renegade"
end.subscribe(:clicked_left_mouse_button) do |e|
puts "CLICKED"
end
stack(width: 1.0, border_thickness_left: 4, border_color_left: 0xff_000000) do
background 0xff_4444ff
image "#{GAME_ROOT_PATH}/media/icons/ecw.png", height: 48
inscription "Exspansive Civilian Warfare"
end.subscribe(:clicked_left_mouse_button) do |e|
puts "CLICKED"
end
stack(width: 1.0, border_thickness_left: 4, border_color_left: 0xff_000000) do
background 0xff_444488
image "#{GAME_ROOT_PATH}/media/icons/ia.png", height: 48
inscription "Interim Apex"
end.subscribe(:clicked_left_mouse_button) do |e|
puts "CLICKED"
end
stack(width: 1.0, border_thickness_left: 4, border_color_left: 0xff_000000) do
background 0xff_444444
image "#{GAME_ROOT_PATH}/media/icons/apb.png", height: 48
inscription "Red Alert: A Path Beyond"
end.subscribe(:clicked_left_mouse_button) do |e|
puts "CLICKED"
end
stack(width: 1.0, border_thickness_left: 4, border_color_left: 0xff_000000) do
background 0xff_448844
image "#{GAME_ROOT_PATH}/media/icons/tsr.png", height: 48
inscription "Tiberium Sun: Reborn"
end.subscribe(:clicked_left_mouse_button) do |e|
puts "CLICKED"
end
end
# Game Menu
stack(width: 0.85, height: 1.0) do
background 0xff_5511ff
# Release channel
flow(width: 1.0, height: 0.03) do
background 0xff_444411
inscription "Release"
end
# Game Stuff
flow(width: 1.0, height: 0.89) do
background 0xff_9999ff
# Gane options
stack(width: 0.25, height: 1.0) do
background 0xff_550055
end
# Game News
flow(width: 0.75, height: 1.0) do
background 0xff_005500
end
end
# Play buttons
flow(width: 1.0, height: 0.08) do
background 0xff_551100
button "Play Now"
button "Single player"
end
end
end
end
end
end
end
end

10
lib/window.rb Normal file
View File

@@ -0,0 +1,10 @@
class W3DHub
class Window < CyberarmEngine::Window
def setup
self.caption = "W3D Hub Launcher"
# push_state(W3DHub::States::Boot)
push_state(W3DHub::States::Interface)
end
end
end

BIN
media/icons/apb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
media/icons/ar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
media/icons/ecw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
media/icons/gz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
media/icons/ia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
media/icons/ren.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
media/icons/tsr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
media/icons/w3dhub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
media/icons/woa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

9
w3dhub.rb Normal file
View File

@@ -0,0 +1,9 @@
require "cyberarm_engine"
GAME_ROOT_PATH = File.expand_path(".", __dir__)
require_relative "lib/window"
require_relative "lib/states/boot"
require_relative "lib/states/interface"
W3DHub::Window.new(width: 980, height: 720, borderless: false).show