@@ -2,7 +2,6 @@ local name = ...
22--- @class DialogKeyNS
33local ns = select (2 , ... )
44
5- local GetMouseFoci = GetMouseFoci or function () return { GetMouseFocus () } end
65local GetFrameMetatable = _G .GetFrameMetatable or function () return getmetatable (CreateFrame (' FRAME' )) end
76
87_G .DialogKeyNS = ns -- expose ourselves to the world :)
@@ -162,28 +161,24 @@ function DialogKey:OnPlayerChoiceShow()
162161 local i = 0
163162 for _ , option in ipairs (choiceInfo .options ) do
164163 for _ , button in ipairs (option .buttons ) do
165- i = i + 1
166- buttons [button .id ] = i
164+ if not button .hideButtonShowText or not button .text then
165+ i = i + 1
166+ buttons [button .id ] = i
167+ end
167168 end
168169 end
169170
170171 for option in frame .optionPools :EnumerateActive () do
171- if option .buttons .buttonFramePool then -- 11.1.0
172+ if option .buttons .buttonFramePool then
172173 for buttonFrame in option .buttons .buttonFramePool :EnumerateActive () do
173174 local button = buttonFrame .Button
174175 local key = buttons [button .buttonID ]
175- if self .db .numKeysForPlayerChoice then
176- button .Text :SetText (key .. ' ' .. button .Text :GetText ())
177- end
178- self .playerChoiceButtons [key ] = button
179- end
180- else -- 11.0.7
181- for button in option .buttons .buttonPool :EnumerateActive () do
182- local key = buttons [button .buttonID ]
183- if self .db .numKeysForPlayerChoice then
184- button .Text :SetText (key .. ' ' .. button .Text :GetText ())
176+ if key then
177+ if self .db .numKeysForPlayerChoice then
178+ button .Text :SetText (key .. ' ' .. button .Text :GetText ())
179+ end
180+ self .playerChoiceButtons [key ] = button
185181 end
186- self .playerChoiceButtons [key ] = button
187182 end
188183 end
189184 end
@@ -395,7 +390,7 @@ function DialogKey:ShouldIgnoreInput()
395390 -- Ignore input if no player choice buttons are visible
396391 and not next (self .playerChoiceButtons )
397392 -- Ignore input if no spec buttons are visible
398- and not next (self .specButtons )
393+ and not next (self .specButtons )
399394 then
400395 return true
401396 end
0 commit comments