Skip to content

Commit

Permalink
Make the lobbyuserlist somewhat functional
Browse files Browse the repository at this point in the history
  • Loading branch information
caiohsr14 committed Dec 2, 2018
1 parent 7d0af34 commit d9e1e56
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
Expand Up @@ -2,10 +2,10 @@ local t = Def.ActorFrame {}
if not NSMAN:IsETTP() then
t[#t + 1] = LoadActor("../_chatbox")
end

t[#t + 1] = LoadActor("profile")
t[#t + 1] = LoadActor("roomsearch")
t[#t + 1] = LoadActor("tabs")
t[#t + 1] = LoadActor("../_lobbyuserlist")

local g =
Def.ActorFrame {
Expand Down
Expand Up @@ -49,5 +49,6 @@ t[#t + 1] = LoadActor("../_mousewheelscroll")
t[#t + 1] = LoadActor("currenttime")
t[#t + 1] = LoadActor("../_halppls")
t[#t + 1] = LoadActor("../_userlist")
t[#t + 1] = LoadActor("../_lobbyuserlist")

return t
24 changes: 11 additions & 13 deletions Themes/Til Death/BGAnimations/_lobbyuserlist.lua
Expand Up @@ -8,6 +8,7 @@ local usersX = SCREEN_WIDTH / 4
local usersY = SCREEN_TOP + 15
local usersHeight = 10

local lobbos
local top = SCREENMAN:GetTopScreen()
local qty = 0
local posit = getMainColor("positive")
Expand All @@ -23,6 +24,7 @@ local r =
end,
SetCommand = function(self)
top = SCREENMAN:GetTopScreen()
lobbos = NSMAN:GetLobbyUserList()
end,
UsersUpdateMessageCommand = function(self)
self:queuecommand("Set")
Expand Down Expand Up @@ -60,19 +62,15 @@ local function userLabel(i)
end,
SetCommand = function(self)
local num = self:GetName() + 0
lobbos = NSMAN:GetLobbyUserList()
qty = #lobbos
if num <= qty then
local str = ""
str = str .. top:GetUser(num)
self:settext(str)
if top:GetUserState(num) == 2 or top:GetUserState(num) == 1 then
self:diffuse(posit)
elseif top:GetUserState(num) == 4 then
self:diffuse(negat)
else
self:diffuse(enable)
end
if num <= #lobbos then
self:settext(lobbos[num])
-- if top:GetUserState(num) == 2 or top:GetUserState(num) == 1 then
-- self:diffuse(posit)
-- elseif top:GetUserState(num) == 4 then
-- self:diffuse(negat)
-- else
-- self:diffuse(enable)
-- end
else
self:settext("")
end
Expand Down

0 comments on commit d9e1e56

Please sign in to comment.