Skip to content

Commit

Permalink
Merge pull request #592 from CommodoreGamer118/master
Browse files Browse the repository at this point in the history
fixed visibility issues in :teams and :tools
  • Loading branch information
Sceleratis authored Dec 11, 2021
2 parents 66ce813 + 5feb0f3 commit b409102
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
21 changes: 9 additions & 12 deletions MainModule/Client/UI/Default/Teams.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ return function(data)
self.Active = false
self.AutoButtonColor = false
self.Text = "..."
client.Remote.Send("ProcessCommand", ("%snewteam%s%s%s%s")
:format(data.CmdPrefix, data.CmdSplitKey, teamName.Text, data.CmdSplitKey, teamColor.Text))
client.Remote.Send("ProcessCommand", string.format("%snewteam%s%s%s%s", data.CmdPrefix, data.CmdSplitKey, teamName.Text, data.CmdSplitKey, teamColor.Text));
teamName.Text = ""
teamColor.Text = ""
wait(1.2)
Expand All @@ -95,7 +94,7 @@ return function(data)
})

teamName:GetPropertyChangedSignal("Text"):Connect(function()
teamName.Text = teamName.Text:gsub(data.CmdSplitKey, "")
teamName.Text = string.gsub(teamName.Text, data.CmdSplitKey, "")
end)
teamColor:GetPropertyChangedSignal("Text"):Connect(function()
teamColor.TextColor3 = BrickColor.new(teamColor.Text).Color
Expand All @@ -119,7 +118,7 @@ return function(data)
BackgroundTransparency = 0.5;
TextXAlignment = "Left";
Text = "";
ZIndex = 2;
ZIndex = 11;
Children = {
{
Class = "Frame";
Expand All @@ -128,7 +127,7 @@ return function(data)
Size = UDim2.new(0, 35, 1, -4);
Position = UDim2.new(0, 2, 0.5, 0);
ToolTip = team.TeamColor.Name;
ZIndex = 3;
ZIndex = 13;
},
{
Class = "TextLabel";
Expand All @@ -139,21 +138,20 @@ return function(data)
TextYAlignment = "Center";
Text = team.Name;
ToolTip = "[Auto-Assignable]: "..tostring(team.AutoAssignable);
ZIndex = 3
ZIndex = 13;
},
{
Class = "TextButton";
AnchorPoint = Vector2.new(1, 0.5);
Size = UDim2.new(0, 60, 0, 26);
Position = UDim2.new(1, -30, 0.5, 0);
Text = "Join";
ZIndex = 3;
ZIndex = 13;
OnClick = function(self)
self.Active = false
self.AutoButtonColor = false
self.Text = "..."
client.Remote.Send("ProcessCommand", ("%steam%s%sme%s%s")
:format(data.CmdPrefix, data.CmdSplitKey, data.CmdSpecialPrefix, data.CmdSplitKey, team.Name))
client.Remote.Send("ProcessCommand", string.format("%steam%s%sme%s%s", data.CmdPrefix, data.CmdSplitKey, data.CmdSpecialPrefix, data.CmdSplitKey, team.Name));
wait(1.2)
if self then
self.Active = true
Expand All @@ -168,11 +166,10 @@ return function(data)
Size = UDim2.new(0, 26, 0, 26);
Position = UDim2.new(1, -2, 0.5, 0);
Image = client.MatIcons.Clear;
ZIndex = 3;
ZIndex = 13;
OnClick = function(self)
self.Visible = false
client.Remote.Send("ProcessCommand", ("%sremoveteam%s%s")
:format(data.CmdPrefix, data.CmdSplitKey, team.Name))
client.Remote.Send("ProcessCommand", string.format("%sremoveteam%s%s", data.CmdPrefix, data.CmdSplitKey, team.Name));
wait(1.2)
if self then
self.Visible = true
Expand Down
4 changes: 2 additions & 2 deletions MainModule/Server/Commands/Players.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ return function(Vargs, env)
TextXAlignment = "Left";
Text = " "..bc.Name;
ToolTip = ("RGB: %d, %d, %d | Num: %d"):format(bc.r*255, bc.g*255, bc.b*255, bc.Number);
ZIndex = 2;
ZIndex = 11;
Children = {
{
Class = "Frame";
BackgroundColor3 = bc.Color;
Size = UDim2.new(0, 80, 1, -4);
Position = UDim2.new(1, -82, 0, 2);
ZIndex = 3;
ZIndex = 12;
}
};
})
Expand Down

0 comments on commit b409102

Please sign in to comment.