added proper admin icon support
This commit is contained in:
parent
ff3f117135
commit
b641829561
|
|
@ -22,6 +22,25 @@ local bigEasingStyle = Enum.EasingStyle.Back
|
|||
local smallEasingStyle = Enum.EasingStyle.Quart
|
||||
local lightBackground = true
|
||||
|
||||
local adminUserNames = {
|
||||
"ARCHBLOX",
|
||||
"Thomas",
|
||||
"Conkley",
|
||||
"Josh",
|
||||
"BagOfDreams",
|
||||
"templater",
|
||||
"AliMine8555",
|
||||
"Mura",
|
||||
"rec01n",
|
||||
"zombieboy667",
|
||||
"Penguin",
|
||||
"cott",
|
||||
"SQL",
|
||||
"MORBLOX",
|
||||
"Stick",
|
||||
"sodium",
|
||||
}
|
||||
|
||||
local function waitForChild(instance, name)
|
||||
while not instance:FindFirstChild(name) do
|
||||
instance.ChildAdded:wait()
|
||||
|
|
@ -679,10 +698,13 @@ if UserSettings and LoadLibrary then
|
|||
end
|
||||
end
|
||||
|
||||
local function getMembershipTypeIcon(membershipType,name)
|
||||
if name == "Thomas" then
|
||||
return "rbxasset://textures/ui/TinyAdminIcon.png"
|
||||
elseif membershipType == Enum.MembershipType.None then
|
||||
local function getIconForPlayer(membershipType,name)
|
||||
for i,v in ipairs(adminUserNames) do
|
||||
if v == name then
|
||||
return "rbxasset://textures/ui/TinyAdminIcon.png"
|
||||
end
|
||||
end
|
||||
if membershipType == Enum.MembershipType.None then
|
||||
return ""
|
||||
elseif membershipType == Enum.MembershipType.BuildersClub then
|
||||
return "rbxasset://textures/ui/TinyBcIcon.png"
|
||||
|
|
@ -700,11 +722,11 @@ if UserSettings and LoadLibrary then
|
|||
local fontHeight = 20
|
||||
|
||||
local friendIconImage = getFriendStatusIcon(friendStatus)
|
||||
nameObject.MembershipTypeLabel.FriendStatusLabel.Visible = (friendIconImage ~= nil)
|
||||
nameObject.UserIconLabel.FriendStatusLabel.Visible = (friendIconImage ~= nil)
|
||||
|
||||
if friendIconImage ~= nil then
|
||||
--Show friend icon
|
||||
nameObject.MembershipTypeLabel.FriendStatusLabel.Image = friendIconImage
|
||||
nameObject.UserIconLabel.FriendStatusLabel.Image = friendIconImage
|
||||
nameObject.NameLabel.Position =UDim2.new(0,2*fontHeight,0,1)
|
||||
nameObject.NameLabel.Size = UDim2.new(1,-2*fontHeight,1,-2)
|
||||
else
|
||||
|
|
@ -717,7 +739,7 @@ if UserSettings and LoadLibrary then
|
|||
local fontHeight = 20
|
||||
|
||||
nameObject.Size = UDim2.new(1,0,0,fontHeight)
|
||||
nameObject.MembershipTypeLabel.Image = getMembershipTypeIcon(membershipStatus,nameObject.NameLabel.Text)
|
||||
nameObject.UserIconLabel.Image = getIconForPlayer(membershipStatus,nameObject.NameLabel.Text)
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -748,13 +770,13 @@ if UserSettings and LoadLibrary then
|
|||
frame.BackgroundTransparency = 0.5
|
||||
frame.BorderSizePixel = 0
|
||||
|
||||
local membershipStatusLabel = Instance.new("ImageLabel")
|
||||
membershipStatusLabel.Name = "MembershipTypeLabel"
|
||||
membershipStatusLabel.BackgroundTransparency = 1
|
||||
membershipStatusLabel.Size = UDim2.new(1,0,1,0)
|
||||
membershipStatusLabel.Position = UDim2.new(0,0,0,0)
|
||||
membershipStatusLabel.SizeConstraint = Enum.SizeConstraint.RelativeYY
|
||||
membershipStatusLabel.Parent = frame
|
||||
local UserIconStatusLabel = Instance.new("ImageLabel")
|
||||
UserIconStatusLabel.Name = "UserIconLabel"
|
||||
UserIconStatusLabel.BackgroundTransparency = 1
|
||||
UserIconStatusLabel.Size = UDim2.new(1,0,1,0)
|
||||
UserIconStatusLabel.Position = UDim2.new(0,0,0,0)
|
||||
UserIconStatusLabel.SizeConstraint = Enum.SizeConstraint.RelativeYY
|
||||
UserIconStatusLabel.Parent = frame
|
||||
|
||||
local friendStatusLabel = Instance.new("ImageLabel")
|
||||
friendStatusLabel.Name = "FriendStatusLabel"
|
||||
|
|
|
|||
Loading…
Reference in New Issue