Compare commits
No commits in common. "0907591e8ecebcdaa997de0fffb1febfe9b73866" and "32b6b4c81912c59c8604c9036d288af705cc4185" have entirely different histories.
0907591e8e
...
32b6b4c819
|
@ -35,60 +35,6 @@ function Poker_TableBrowser.Update()
|
|||
end
|
||||
end
|
||||
|
||||
do
|
||||
local currSort = 1
|
||||
local currOrder = "asc"
|
||||
|
||||
function Poker_TableBrowser.SortTables(id)
|
||||
if currSort == id then
|
||||
if currOrder == "desc" then
|
||||
currOrder = "asc"
|
||||
else
|
||||
currOrder = "desc"
|
||||
end
|
||||
elseif id then
|
||||
currSort = id
|
||||
currOrder = "asc"
|
||||
end
|
||||
|
||||
table.sort(Poker_TableBrowser.Tables, function (v1, v2)
|
||||
if currOrder == "desc" then
|
||||
return v1[currSort] > v2[currSort]
|
||||
else
|
||||
return v1[currSort] < v2[currSort]
|
||||
end
|
||||
end)
|
||||
Poker_TableBrowser.Update()
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local selection = nil
|
||||
function Poker_TableBrowser.SelectEntry(id)
|
||||
if selection then
|
||||
for i = 1, MAX_TABLES do
|
||||
getglobal("Poker_TableBrowserTableListEntry"..i.."BG"):Hide()
|
||||
end
|
||||
selection.isSelected = nil
|
||||
end
|
||||
|
||||
selection = Poker_TableBrowser.Tables[id]
|
||||
selection.isSelected = true
|
||||
end
|
||||
|
||||
function Poker_TableBrowser.IsSelected(id)
|
||||
return Poker_TableBrowser.Tables[id] == selection
|
||||
end
|
||||
|
||||
function Poker_TableBrowser.JoinSelectedTable()
|
||||
if not selection then
|
||||
return
|
||||
end
|
||||
|
||||
print(string.format("Joining %s's table %s", selection[2], selection[1]))
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, MAX_TABLES do
|
||||
table.insert(Poker_TableBrowser.Tables, {
|
||||
"Test Table "..i,
|
||||
|
@ -100,4 +46,4 @@ for i = 1, MAX_TABLES do
|
|||
})
|
||||
end
|
||||
|
||||
Poker_TableBrowser.Update()
|
||||
Poker_TableBrowser.Update()
|
|
@ -5,8 +5,8 @@
|
|||
<Button name="Poker_TableBrowserHeader" virtual="true">
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Poker_TableBrowser.SortTables(self:GetID())
|
||||
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
|
||||
Poker_TableBrowser.SortTables(this:GetID())
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
getglobal(self:GetName().."BG"):SetVertexColor(1, 1, 1, 1)
|
||||
|
|
Loading…
Reference in New Issue