This commit is contained in:
lx
2026-07-06 14:01:11 -04:00
commit c4f97d729d
16468 changed files with 935321 additions and 0 deletions
@@ -0,0 +1,100 @@
--[[
// BaseScreen.lua
// Creates a base screen with breadcrumbs and title. Do not use for a pane/tab
]]
local CoreGui = game:GetService("CoreGui")
local GuiRoot = CoreGui:FindFirstChild("RobloxGui")
local Modules = GuiRoot:FindFirstChild("Modules")
local ShellModules = Modules:FindFirstChild("Shell")
local GlobalSettings = require(ShellModules:FindFirstChild('GlobalSettings'))
local Utility = require(ShellModules:FindFirstChild('Utility'))
local function createBaseScreen(controller)
local this = {}
local container = Utility.Create'Frame'
{
Name = "Container";
Size = UDim2.new(1, 0, 1, 0);
BackgroundTransparency = 1;
}
local backButton = Utility.Create'ImageButton'
{
Name = "BackButton";
BackgroundTransparency = 1;
Image = 'rbxasset://textures/ui/Lobby/Buttons/nine_slice_button.png';
ImageColor3 = GlobalSettings.GreyButtonColor;
Size = UDim2.new(0,175,0,48);
ScaleType = Enum.ScaleType.Slice;
SliceCenter = Rect.new(9,9,39,39);
}
local backImage = Utility.Create'ImageLabel'
{
Name = "BackImage";
Size = UDim2.new(0,48,0,48);
BackgroundTransparency = 1;
Image = "rbxasset://textures/ui/Shell/Icons/BackIcon@1080.png";
Parent = container;
}
local backText = Utility.Create'TextLabel'
{
Name = "BackText";
Size = UDim2.new(0, 0, 0, backImage.Size.Y.Offset);
Position = UDim2.new(0, backImage.Size.X.Offset + 8, 0, 0);
BackgroundTransparency = 1;
Font = GlobalSettings.RegularFont;
FontSize = GlobalSettings.ButtonSize;
TextXAlignment = Enum.TextXAlignment.Left;
TextColor3 = GlobalSettings.WhiteTextColor;
Text = "";
Parent = container;
}
local titleText = Utility.Create'TextLabel'
{
Name = "TitleText";
Size = UDim2.new(0, 0, 0, 35);
Position = UDim2.new(0, 16, 0, backImage.Size.Y.Offset + 74);
BackgroundTransparency = 1;
Font = GlobalSettings.LightFont;
FontSize = GlobalSettings.HeaderSize;
TextXAlignment = Enum.TextXAlignment.Left;
TextColor3 = GlobalSettings.WhiteTextColor;
Text = "";
Parent = container;
}
--[[ Public API ]]--
this.Container = container
this.BackImage = backImage
this.BackText = backText
this.TitleText = titleText
function this:SetBackText(newText)
local TextService = game:GetService('TextService')
local textSize = TextService:GetTextSize(
newText,
Utility.ConvertFontSizeEnumToInt(backText.FontSize),
backText.Font,
Vector2.new()) -- Essentially, we don't want to bound our textbox
local spacing = (backButton.Size.Y.Offset - backImage.Size.Y.Offset) / 2
backText.Text = newText
backButton.Size = UDim2.new(0, spacing * 2 + textSize.X + backImage.Size.X.Offset + 8,
backButton.Size.Y.Scale, backButton.Size.Y.Offset)
end
this:SetBackText(controller:GetBackText())
backButton.MouseButton1Click:connect(function()
controller:OnBackButtonClick()
end)
return this
end
return createBaseScreen
@@ -0,0 +1,108 @@
local CoreGui = game:GetService("CoreGui")
local GuiRoot = CoreGui:FindFirstChild("RobloxGui")
local Modules = GuiRoot:FindFirstChild("Modules")
local ShellModules = Modules:FindFirstChild("Shell")
local Templates = ShellModules:FindFirstChild("Templates")
local BaseScreen = require(Templates:FindFirstChild('BaseScreen'))
local GlobalSettings = require(ShellModules:FindFirstChild('GlobalSettings'))
local SoundManager = require(ShellModules:FindFirstChild('SoundManager'))
local Strings = require(ShellModules:FindFirstChild('LocalizedStrings'))
local Utility = require(ShellModules:FindFirstChild('Utility'))
local function createSettingsScreenBase(controller)
local this = BaseScreen(controller)
local VersionBuildIdText = Utility.Create'TextLabel'
{
Name = "VersionBuildIdText";
Size = UDim2.new(0, 0, 0, 0);
Position = UDim2.new(1, 0, 1, 0);
BackgroundTransparency = 1;
Font = GlobalSettings.RegularFont;
FontSize = GlobalSettings.TitleSize;
TextColor3 = GlobalSettings.WhiteTextColor;
TextXAlignment = Enum.TextXAlignment.Right;
TextYAlignment = Enum.TextYAlignment.Bottom;
Text = '';
Parent = this.Container;
}
do
local versionInfo = controller:GetVersionInfo()
local versionStr = string.format(Strings:LocalizedString('VersionIdString'), tostring(versionInfo['Major']) , tostring(versionInfo['Minor']), tostring(versionInfo['Build']), tostring(versionInfo['Revision']))
VersionBuildIdText.Text = versionStr
end
local spacing = 40
local DefaultTransparency = GlobalSettings.TextBoxDefaultTransparency
local SelectedTransparency = GlobalSettings.TextBoxSelectedTransparency
local AccountButton = Utility.Create'TextButton'
{
Name = "AccountButton";
Size = UDim2.new(0, 394, 0, 612);
Position = UDim2.new(0, 0, 0, 238);
BackgroundTransparency = DefaultTransparency;
BackgroundColor3 = GlobalSettings.TextBoxColor;
BorderSizePixel = 0;
Text = "";
Parent = this.Container;
SoundManager:CreateSound('MoveSelection');
}
this.AccountButton = AccountButton
this.Spacing = spacing
local AccountIcon = Utility.Create'ImageLabel'
{
Name = "AccountIcon";
Size = UDim2.new(0, 256, 0, 256);
BackgroundTransparency = 1;
Image = 'rbxasset://textures/ui/Shell/Icons/AccountIcon.png';
Parent = AccountButton;
AnchorPoint = Vector2.new(0.5, 0.5);
Position = UDim2.new(0.5, 0, 0.5, 0);
}
local AccountText = Utility.Create'TextLabel'
{
Name = "AccountText";
Size = UDim2.new(0, 0, 0, 0);
Position = UDim2.new(0.5, 0, 1, -96);
BackgroundTransparency = 1;
Font = GlobalSettings.RegularFont;
FontSize = GlobalSettings.TitleSize;
TextColor3 = GlobalSettings.WhiteTextColor;
Text = Strings:LocalizedString("AccountWord");
Parent = AccountButton;
}
AccountButton.SelectionGained:connect(function()
Utility.PropertyTweener(AccountButton, "BackgroundTransparency", SelectedTransparency,
SelectedTransparency, 0, Utility.EaseInOutQuad, true)
end)
AccountButton.SelectionLost:connect(function()
AccountButton.BackgroundTransparency = DefaultTransparency
end)
--[[ Input ]]--
AccountButton.MouseButton1Click:connect(function()
SoundManager:Play('ButtonPress')
controller:OpenAccountScreen()
end)
--[[ Public API ]]--
--Override
function this:GetDefaultSelectionObject()
return AccountButton
end
return this
end
return createSettingsScreenBase
@@ -0,0 +1,160 @@
local CoreGui = game:GetService("CoreGui")
local GuiRoot = CoreGui:FindFirstChild("RobloxGui")
local Modules = GuiRoot:FindFirstChild("Modules")
local ShellModules = Modules:FindFirstChild("Shell")
local Templates = ShellModules:FindFirstChild("Templates")
local SettingsScreenBase = require(Templates:FindFirstChild('SettingsScreenBase'))
local GlobalSettings = require(ShellModules:FindFirstChild('GlobalSettings'))
local SoundManager = require(ShellModules:FindFirstChild('SoundManager'))
local Utility = require(ShellModules:FindFirstChild('Utility'))
local Strings = require(ShellModules:FindFirstChild('LocalizedStrings'))
local function createSettingsScreenConsole(controller)
local this = SettingsScreenBase(controller)
local DefaultTransparency = GlobalSettings.TextBoxDefaultTransparency
local SelectedTransparency = GlobalSettings.TextBoxSelectedTransparency
local spacing = this.Spacing
local SwitchProfileButton = Utility.Create'TextButton'
{
Name = "SwitchProfileButton";
Size = UDim2.new(0, 394, 0, 612);
Position = UDim2.new(0, this.AccountButton.Size.X.Offset + spacing, 0, 238);
BackgroundTransparency = DefaultTransparency;
BackgroundColor3 = GlobalSettings.TextBoxColor;
BorderSizePixel = 0;
Text = "";
Parent = this.Container;
SoundManager:CreateSound('MoveSelection');
}
local OverscanButton = SwitchProfileButton:Clone()
OverscanButton.Name = "OverscanButton"
OverscanButton.Position = UDim2.new(0, SwitchProfileButton.Position.X.Offset + SwitchProfileButton.Size.X.Offset + spacing, 0, 238)
OverscanButton.Parent = this.Container
local HelpButton = OverscanButton:Clone()
HelpButton.Name = "HelpButton"
HelpButton.Position = UDim2.new(0, OverscanButton.Position.X.Offset + OverscanButton.Size.X.Offset + spacing, 0, 238)
HelpButton.Parent = this.Container
local SwitchProfileIcon = Utility.Create'ImageLabel'
{
Name = "SwitchProfileIcon";
Size = UDim2.new(0, 224, 0, 255);
BackgroundTransparency = 1;
Image = 'rbxasset://textures/ui/Shell/Icons/ProfileIcon.png';
Parent = SwitchProfileButton;
AnchorPoint = Vector2.new(0.5, 0.5);
Position = UDim2.new(0.5, 0, 0.5, 0);
}
local SwitchProfileText = Utility.Create'TextLabel'
{
Name = "SwitchProfileText";
Size = UDim2.new(0, 0, 0, 0);
Position = UDim2.new(0.5, 0, 1, -96);
BackgroundTransparency = 1;
Font = GlobalSettings.RegularFont;
FontSize = GlobalSettings.TitleSize;
TextColor3 = GlobalSettings.WhiteTextColor;
Text = Strings:LocalizedString("SwitchProfileWord");
Parent = SwitchProfileButton;
}
local OverscanIcon = Utility.Create'ImageLabel'
{
Name = "OverscanIcon";
Size = UDim2.new(0, 256, 0, 181);
BackgroundTransparency = 1;
Image = 'rbxasset://textures/ui/Shell/Icons/TVIcon.png';
Parent = OverscanButton;
AnchorPoint = Vector2.new(0.5, 0.5);
Position = UDim2.new(0.5, 0, 0.5, 0);
}
local OverscanText = SwitchProfileText:Clone()
OverscanText.Name = "OverscanText";
OverscanText.Text = Strings:LocalizedString("OverscanWord");
OverscanText.Parent = OverscanButton
local HelpIcon = Utility.Create'ImageLabel'
{
Name = "HelpIcon";
Size = UDim2.new(0, 256, 0, 256);
BackgroundTransparency = 1;
Image = 'rbxasset://textures/ui/Shell/Icons/HelpIcon.png';
Parent = HelpButton;
AnchorPoint = Vector2.new(0.5, 0.5);
Position = UDim2.new(0.5, 0, 0.5, 0);
}
local HelpText = SwitchProfileText:Clone()
HelpText.Name = "HelpText";
HelpText.Text = Strings:LocalizedString("HelpWord");
HelpText.Parent = HelpButton
SwitchProfileButton.SelectionGained:connect(function()
Utility.PropertyTweener(SwitchProfileButton, "BackgroundTransparency", SelectedTransparency,
SelectedTransparency, 0, Utility.EaseInOutQuad, true)
end)
SwitchProfileButton.SelectionLost:connect(function()
SwitchProfileButton.BackgroundTransparency = DefaultTransparency
end)
OverscanButton.SelectionGained:connect(function()
Utility.PropertyTweener(OverscanButton, "BackgroundTransparency", SelectedTransparency,
SelectedTransparency, 0, Utility.EaseInOutQuad, true)
end)
OverscanButton.SelectionLost:connect(function()
OverscanButton.BackgroundTransparency = DefaultTransparency
end)
HelpButton.SelectionGained:connect(function()
Utility.PropertyTweener(HelpButton, "BackgroundTransparency", SelectedTransparency,
SelectedTransparency, 0, Utility.EaseInOutQuad, true)
end)
HelpButton.SelectionLost:connect(function()
HelpButton.BackgroundTransparency = DefaultTransparency
end)
local switchProfileDebounce = false
SwitchProfileButton.MouseButton1Click:connect(function()
SoundManager:Play('ButtonPress')
if switchProfileDebounce then return end
switchProfileDebounce = true
controller:OpenSwitchProfileScreen()
switchProfileDebounce = false
end)
local overscanDebounce = false
OverscanButton.MouseButton1Click:connect(function()
SoundManager:Play('ButtonPress')
if overscanDebounce then return end
overscanDebounce = true
controller:OpenOverscanScreen()
overscanDebounce = false
end)
local helpDebounce = false
HelpButton.MouseButton1Click:connect(function()
SoundManager:Play('ButtonPress')
if helpDebounce then return end
helpDebounce = true
controller:OpenHelpScreen()
helpDebounce = false
end)
return this
end
return createSettingsScreenConsole