@@ -1538,25 +1538,27 @@ end
15381538
15391539function create_UIBox_current_hands (simple )
15401540 G .current_hands = {}
1541+
1542+ local visible_hands = {}
1543+ for _ , v in ipairs (G .handlist ) do
1544+ if SMODS .is_poker_hand_visible (v ) then
1545+ table.insert (visible_hands , v )
1546+ end
1547+ end
1548+
15411549 local index = 0
15421550 for _ , v in ipairs (G .handlist ) do
15431551 local ui_element = create_UIBox_current_hand_row (v , simple )
15441552 G .current_hands [index + 1 ] = ui_element
15451553 if ui_element then
15461554 index = index + 1
15471555 end
1548- if index >= 10 then
1556+ if index >= 10 and # visible_hands > 12 then -- keep pagination off until there's more than the vanilla max of 12 hands
15491557 break
15501558 end
15511559 end
15521560
1553- local visible_hands = {}
1554- for _ , v in ipairs (G .handlist ) do
1555- if SMODS .is_poker_hand_visible (v ) then
1556- table.insert (visible_hands , v )
1557- end
1558- end
1559-
1561+
15601562 local hand_options = {}
15611563 for i = 1 , math.ceil (# visible_hands / 10 ) do
15621564 table.insert (hand_options ,
@@ -1566,7 +1568,8 @@ function create_UIBox_current_hands(simple)
15661568 local object = {n = G .UIT .ROOT , config = {align = " cm" , colour = G .C .CLEAR }, nodes = {
15671569 {n = G .UIT .R , config = {align = " cm" , padding = 0.04 }, nodes =
15681570 G .current_hands },
1569- {n = G .UIT .R , config = {align = " cm" , padding = 0 }, nodes = {
1571+ -- UI consistency with vanilla
1572+ # visible_hands > 12 and {n = G .UIT .R , config = {align = " cm" , padding = 0 }, nodes = {
15701573 create_option_cycle ({
15711574 options = hand_options ,
15721575 w = 4.5 ,
@@ -1576,7 +1579,8 @@ function create_UIBox_current_hands(simple)
15761579 current_option = 1 ,
15771580 colour = G .C .RED ,
15781581 no_pips = true
1579- })}}}}
1582+ })}} or nil ,
1583+ }}
15801584
15811585 local t = {n = G .UIT .ROOT , config = {align = " cm" , minw = 3 , padding = 0.1 , r = 0.1 , colour = G .C .CLEAR }, nodes = {
15821586 {n = G .UIT .O , config = {
0 commit comments