ID:778450
 
(See the best response by The Motto.)
Is there currently a way to press tab and go to the next control on an interface?

Say you have a blank window and two input controls on it, like a login screen with username and password. After typing in the username, pressing tab would set focus to the password input control.

Can this be achieved with the interface design?
Best response
In response to The Motto (#1)
The Motto wrote:
I Suggest You Read This, http://www.byond.com/docs/ref/skinparams.html

Read through the whole thing many times, also searched for the word "tab" and read anything related.

Actually, that document doesn't say a single thing about tabbing to controls.
The Motto wrote:
Perhaps You Can Add In The Coding When Someone Presses Tab And Their In That Input Bar1 Then It AutoMatically Take Them Into Input Bar2

I've tried adding a macro that switches focus between controls, but the macro's wouldn't fire anything (there's no map control on this splash screen).

Maybe someone can chime in on how to make the macro's function no matter what control has focus?
In response to FIREking (#3)
You Can Use Forum_account's Keyboard Library and Try The Implement into Your System, http://www.byond.com/developer/Forum_account/Keyboard
You could easily include a macro that's assigned to the Tab key to switch focus between the two inputs.

mob/verb
switch_focus()
if(winget(usr, "window.input1", "focus")) //If input1 is in focus..
winset(usr, null, "window.input2.focus = \"true\"") //Make input2 have focus.
else
winset(usr, null, "window.input1.focus = \"true\"") //Otherwise, give input1 focus.

//This is going by the basis that you would want to switch back and forth between the two inputs.


Pardon if I messed up anywhere since I haven't worked with winset/winget in awhile but this should be the gist of what you're trying to do. (:
I ended up writing all of the login stuff in javascript and just browse to it with a browse control in a pre-determined spot on the login image (displays background image to complete the picture).

So tab functions like it normally would on a web page / html form.