Panel.FocusPrevious

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:FocusPrevious( )
Description:
Moves the focus to the previous sibling control.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.FocusPrevious]Panel.FocusPrevious [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMoves the focus depending on key presses.
Used onNewerClient.png
Code
// P = a Panel object
if (input.IsKeyDown(9) ) then // if tab is pressed
    P:FocusNext()
elseif (input.IsKeyDown(8) ) then // if backspace is pressed
    P:FocusPrevious()
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox