Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove fastload setting and change loading from ugly text to responsive and beatiful icon #1434

Merged
merged 5 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion MainModule/Client/Core/Variables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ return function(Vargs, GetEnv)
ParticlesEnabled = true;
CapesEnabled = true;
HideChatCommands = false;
FastLoadUserpanel = true;
Particles = {};
KeyBinds = {};
Aliases = {};
Expand Down
13 changes: 0 additions & 13 deletions MainModule/Client/UI/Default/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,6 @@ return function(data, env)
toggle.Text = "Default"
end
end
};
{
Text = "Userpanel FastLoad: ";
Desc = "- Enables/Disables fast loading of userpanel";
Entry = "Boolean";
Value = Variables.FastLoadUserpanel or false;
Function = function(enabled, toggle)
Variables.FastLoadUserpanel = enabled
local text = toggle.Text
toggle.Text = "Saving.."
Remote.Get("UpdateClient","FastLoadUserpanel",enabled)
toggle.Text = text
end
}
}

Expand Down
60 changes: 31 additions & 29 deletions MainModule/Client/UI/Default/UserPanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,6 @@ return function(data, env)
if window then
local commandPrefix = ":"
local playerData, chatMod, settingsData
if not Variables.FastLoadUserpanel then
playerData = Remote.Get("PlayerData")
chatMod = Remote.Get("Setting", {"Prefix", "SpecialPrefix", "BatchKey", "AnyPrefix", "DonorCommands", "DonorCapes"})
settingsData = Remote.Get("AllSettings")
Variables.Aliases = playerData.Aliases or {}
commandPrefix = {chatMod.Prefix}
end
local tabFrame = window:Add("TabFrame", {
Size = UDim2.new(1, -10, 1, -10);
Position = UDim2.new(0, 5, 0, 5);
Expand Down Expand Up @@ -477,30 +470,39 @@ return function(data, env)

end

if Variables.FastLoadUserpanel then
local LOAD_TEXT = {
BackgroundTransparency = 1;
Size = UDim2.new(1, 0, 1, 0);
Text = "Loading...";
TextScaled = true;
TextColor3 = Color3.new(1, 1, 1);
TextXAlignment = Enum.TextXAlignment.Center;
TextYAlignment = Enum.TextYAlignment.Center;
Font = Enum.Font.SourceSansSemibold
}
local LOAD_ICON = {
BackgroundTransparency = 1;
Size = UDim2.new(0, 14, 0, 14);
Position = UDim2.new(0.5, 0, 0.5, 0);
AnchorPoint = Vector2.new(0.5, 0.5);
Image = "rbxassetid://69395121";
ImageTransparency = 0.1;
ZIndex = 10;
}

local loadingIcons = {donorTab:Add("ImageLabel", LOAD_ICON), keyTab:Add("ImageLabel", LOAD_ICON), aliasTab:Add("ImageLabel", LOAD_ICON), clientTab:Add("ImageLabel", LOAD_ICON), gameTab:Add("ImageLabel", LOAD_ICON)}
gTable = window.gTable
window:Ready()

task.spawn(function()
local start = os.clock()

local donorLoad, keyLoad, aliasLoad, clientLoad, gameLoad = donorTab:Add("TextLabel", LOAD_TEXT), keyTab:Add("TextLabel", LOAD_TEXT), aliasTab:Add("TextLabel", LOAD_TEXT), clientTab:Add("TextLabel", LOAD_TEXT), gameTab:Add("TextLabel", LOAD_TEXT)
gTable = window.gTable
window:Ready()
playerData = Remote.Get("PlayerData")
chatMod = Remote.Get("Setting",{"Prefix","SpecialPrefix","BatchKey","AnyPrefix","DonorCommands","DonorCapes"})
settingsData = Remote.Get("AllSettings")
Variables.Aliases = playerData.Aliases or {}
commandPrefix = chatMod.Prefix

for _, v in {donorLoad, keyLoad, aliasLoad, clientLoad, gameLoad} do
v:Destroy()
while loadingIcons[1].Parent do
for _, v in loadingIcons do
v.Rotation = -(os.clock() - start)/(1/60)*10
end
task.wait(1/60)
end
end)

playerData = Remote.Get("PlayerData")
chatMod = Remote.Get("Setting",{"Prefix","SpecialPrefix","BatchKey","AnyPrefix","DonorCommands","DonorCapes"})
settingsData = Remote.Get("AllSettings")
Variables.Aliases = playerData.Aliases or {}
commandPrefix = chatMod.Prefix

for _, v in loadingIcons do
v:Destroy()
end

--// Donor Tab
Expand Down
Loading