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