Exemple #1
0
 public TargetPrompt(string message, Point origin, Point initialPoint, Action <Point> actionPosition, MapPanel panel, PromptWindowTemplate template)
     : base(template)
 {
     this._actionPosition = actionPosition;
     _selectedPosition    = initialPoint;
     this._origin         = origin;
     this._panel          = panel;
     this._message        = message;
 }
Exemple #2
0
 /// <summary>
 /// The action is done on a local position case.  North = 0, -1.  West = -1, 0
 /// </summary>
 /// <param name="message"></param>
 /// <param name = "origin"></param>
 /// <param name="actionPosition"></param>
 public DirectionalPrompt(string message, Point origin, Action <Point> actionPosition, PromptWindowTemplate template)
     : base(template)
 {
     this._actionPosition = actionPosition;
     this._origin         = origin;
     this._message        = message;
 }
Exemple #3
0
 public TargetPrompt(string message, Point origin, Action <Point> actionPosition, MapPanel panel, PromptWindowTemplate template) : this(message, origin, origin, actionPosition, panel, template)
 {
 }
Exemple #4
0
 public OptionsPrompt(string message, string noOptions, IEnumerable <T> options, Func <T, string> toStringFunc, Action <T> actionCount, PromptWindowTemplate template)
     : base(template)
 {
     this._actionCount      = actionCount;
     this._options          = new List <T>(options);
     this._toStringFunction = toStringFunc;
     this._message          = message;
     this._noOptions        = noOptions;
 }
Exemple #5
0
 public BooleanPrompt(string message, bool defaultBooleanAction, Action <bool> actionBoolean, PromptWindowTemplate template)
     : base(template)
 {
     this._defaultBooleanAction = defaultBooleanAction;
     this._actionBoolean        = actionBoolean;
     this._message = message;
 }
Exemple #6
0
 protected PromptWindow(PromptWindowTemplate template)
     : base(template)
 {
     IsPopup = true;
     GameLog = template.Log;
 }
Exemple #7
0
        public CountPrompt(string message, Action <int> actionCount, int maxValue, int minValue, int initialValue, PromptWindowTemplate template)
            : base(template)
        {
            this._actionCount = actionCount;
            this._maxValue    = maxValue;
            this._minValue    = minValue;
            this._message     = message;

            initialValue = initialValue > maxValue ? maxValue : initialValue;
            initialValue = initialValue < minValue ? minValue : initialValue;

            this._value = initialValue;

            _firstUse = false;

            _negative = initialValue < 0;
        }