ID:2274202
 
(See the best response by Kozuma3.)
Could someone tell me how to get started on creating arrow buttons on the interface windows. I am trying to create a Character Creator Window and use the arrows to help go through options, but the only thing I have is the ">" and "<".
What do you mean by arrows? Are you using interface objects like buttons? If so, I highly recommend switching to screen-obj HUD based menus and just parse the physical arrow keys to the menu when the menu is activated and when the menu is inactive, switch them back to movement.
In response to Maximus_Alex2003


here is the basic layout and I wanted it so that clicking the arrows cycles through the options, I know that screen objs are better than interface, but I really like the interface for small things like these and I really liked how i made this.
In response to Dayvon64
Looks good, could try "bolding" them or using 2 of each for the direction such as >> or <<
In response to Kozuma3
The problem isn't the arrows themselves, I just can't figure out how to make it so that when you press the arrows they cycle through the different options. I know how to make the verbs/procs connect with the buttons so when you press a button the verb will activate.
In response to Dayvon64
Dayvon64 wrote:
I know how to make the verbs/procs connect with the buttons so when you press a button the verb will activate.

If you know that much you can easily make it so when the button is changed a variable is changed to indicate what "state" that selection is in then you can update the "end-result" image of the character you're creating with the new information.
In response to Dayvon64
Dayvon64 wrote:
The problem isn't the arrows themselves, I just can't figure out how to make it so that when you press the arrows they cycle through the different options. I know how to make the verbs/procs connect with the buttons so when you press a button the verb will activate.

You'll probably want to add an argument in the proc that processes the button and rename that variable with winget() and winset() based on the current choice. As in, under the interface editor there should be a command choice for the button. You would put something like, nextChoice SpikeyHair for the Hair Style > button and so on.
If you really want to condense it down, have a single proc handle all the choice options and just winget() the button name, then switch() to the button type, and then switch() again to whether it's Next/Previous.
Have the choices in a list and just cycle between the list, once you've reached the length of the list, cycle back to the beginning of the list.

I don't have complete access to DM right now, but basically utilize list(), winget()/winset(), switch(), and probably a few other list()-associated procs/vars.

*edited*
In response to Maximus_Alex2003
I see what you mean, also, how would I make the player show up in the white box. I was told to use the Browser option, but wasn't given any explanation to how or why.
Best response
Here's an example I made real quick for ya.

var/tmp/char_select_hair_max = 2

mob/var/tmp
char_select_hair = 0
// 0 = bald
// 1 = short
// 2 = long

mob/verb/LeftHairArrow()
char_select_hair--
if(0 > char_select_hair)
char_select_hair = char_select_hair_max
UpdatePlayerImage()
mob/verb/RightHairArrow()
char_select_hair++
if(char_select_hair > char_select_hair_max)
char_select_hair = 0
UpdatePlayerImage()

mob/proc/UpdatePlayerImage()
switch(char_select_hair)
if(0)//bald
;
if(1)//short
;
if(2)//long
;
In response to Kozuma3
Thank you, it works perfectly! I also learned how to do this for other options so it's even better!