GUI button with veriable value as text

Started by shayavr, Sat 22/10/2011 19:32:46

Previous topic - Next topic

shayavr

hello

This must be an easy one. But I couldn't find solution on the forum and couldn't figure out how to do this myself:

I want to create a GUI for the player to set a 4 digit code to open a suitcase.
So I create a button for + and a botton for -

now I want to create a button that shows the value of the digit but don't know how..

many many thanks!
the dude abides

geork

 Buttons can display a string, so just format that string using String.Format
Code: ags

  int Value = 0 //or whatever value, this'll change i presume...

  ButtonName.Text = String.Format("%d", Value)
 


If your unsure about String formatting, that's something handy to look up in the manual

SMF spam blocked by CleanTalk