Example #1
0
 /// <summary>
 /// Sets up the option, associates it with a menu and the IntLeafOption that needed it to get the input
 /// </summary>
 /// <param name="menu">The menu that this option is a part of</param>
 /// <param name="option">The option that needed the InputGetter to get some input for it</param>
 public InputGetterOption(Menu menu, IntLeafOption option)
     : base("OK", "Enter Value:", option.getDescription(), menu)
 {
     returnOption = option;
     input = "";
     drawer = new InputGetterDrawer(this);
 }
Example #2
0
 /// <summary>
 /// Passes input gotten from an InputGetter to a specified IntLeafOption, the method in the IntLeaf is not called directly since the
 /// selected option must also be changed
 /// </summary>
 /// <param name="input">The input to pass in the form of a string</param>
 /// <param name="option">The option to pass the input to</param>
 public void passInput(string input, IntLeafOption option)
 {
     back(); //Go back since the current state will be an InputGetter and we want to go back to what it was before
     option.takeInput(input);
 }
Example #3
0
 /// <summary>
 /// Called when an IntLeafOption is clicked, creates an InputGetterOption associated with the selected IntLeafOption and sets that to the current node
 /// </summary>
 /// <param name="option">The IntLeafOption that was clicked on</param>
 public void getInput(IntLeafOption option)
 {
     select(new InputGetterOption(this, option));
 }