Vgui snippets

From Valve Developer Community
Revision as of 08:51, 20 May 2007 by Lodle (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Show Hide Buttons

//-----------------------------------------------------------------------------
// Purpose: set state of buttons
//-----------------------------------------------------------------------------
void [class name]::SetVisibleButton(const char *textEntryName, bool state)
{
    Button *entry = dynamic_cast<Button *>(FindChildByName(textEntryName));
    if (entry)
        entry->SetVisible(state);
}