From e874ee4ffe077e78fb1c1dde2ddf9e61fa433ed8 Mon Sep 17 00:00:00 2001 From: Marvin Dalheimer Date: Sat, 29 Apr 2023 19:28:38 +0200 Subject: [PATCH] Select list entries --- TableBrowser.lua | 19 +++++++++++++++++++ TableBrowser.xml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/TableBrowser.lua b/TableBrowser.lua index 1cba89f..d07b829 100755 --- a/TableBrowser.lua +++ b/TableBrowser.lua @@ -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, diff --git a/TableBrowser.xml b/TableBrowser.xml index f995d7e..c6b6b34 100755 --- a/TableBrowser.xml +++ b/TableBrowser.xml @@ -6,7 +6,7 @@ Poker_TableBrowser.SortTables(self:GetID()) - PlaySound("igMainMenuOptionCheckBoxOn") + PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON) getglobal(self:GetName().."BG"):SetVertexColor(1, 1, 1, 1)