Can set focus on and use hidden buttons via kb shortcuts

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Can set focus on and use hidden buttons via kb shortcuts

#1 Post 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.
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

Post Reply