Select list entries
This commit is contained in:
parent
c1663e3d4a
commit
e874ee4ffe
|
@ -62,6 +62,25 @@ do
|
|||
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
|
||||
end
|
||||
|
||||
for i = 1, MAX_TABLES do
|
||||
table.insert(Poker_TableBrowser.Tables, {
|
||||
"Test Table "..i,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Scripts>
|
||||
<OnClick>
|
||||
Poker_TableBrowser.SortTables(self:GetID())
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
getglobal(self:GetName().."BG"):SetVertexColor(1, 1, 1, 1)
|
||||
|
|
Loading…
Reference in New Issue