Page 1 of 1

Can set focus on and use hidden buttons via kb shortcuts

Posted: Fri Mar 08, 2013 6:26 pm
by nate
Just what it says: using tab and enter, players can select and use buttons (like those setup with button.new() and loadUI() in many dialogs) even if they're hidden. (Authors can get around this pretty easily by adding a "if hidden then return" at the top of their button functions. Birther.lua does something similar to this with its hidden c_ok button.)

EDIT: additionally, it seems that hidden buttons can interfere with mouse activation-- I ran into this when trying to use two buttons in the same place, one hidden, when trying to setup a toggleable button ("preview" button making previously hidden "end preview" visible), but when I figured out what was happening, just moved the buttons to different locations on my dialog.