Refactored to use pages

This commit is contained in:
2021-11-10 17:55:50 -06:00
parent ac9612dadd
commit 3266ac85e0
13 changed files with 736 additions and 479 deletions

42
lib/pages/settings.rb Normal file
View File

@@ -0,0 +1,42 @@
class W3DHub
class Pages
class Settings < Page
def setup
body.clear do
stack(width: 1.0, height: 1.0, padding: 64) do
para "<b>Language</b>"
para "Select the UI language you'd like to use in the W3D Hub Launcher. You should restart the launcher after changing this setting before the ui will update", width: 1.0
list_box items: ["English", "French", "German"], width: 1.0
para "<b>Folder Paths</b>", margin_top: 32
stack(width: 1.0, height: 0.35) do
flow(width: 1.0, height: 0.5) do
para "<b>App Install Folder</b>", width: 0.249
stack(width: 0.75, height: 1.0) do
edit_line "C:\\Program Files (x86)\\W3D Hub", width: 1.0
inscription "The folder into which new games and apps will be installed by the launcher"
end
end
flow(width: 1.0, height: 0.5) do
para "<b>Package Cache Folder</b>", width: 0.249
stack(width: 0.75, height: 1.0) do
edit_line "C:\\Program Data\\W3D Hub\\Launcher\\package-cache", width: 1.0
inscription "A folder which will be used to cache downloaded packages used to install games and apps"
end
end
end
para "<b>Diagnostics</b>"
check_box "Enable Automatic Error Reporting", text_size: 16
inscription "If this is enabled the launcher will automatically report errors to the development team, along with basic information about your machine, such as operating system.", width: 1.0
button "Save", margin_top: 32
end
end
end
end
end
end