public override int OnChooseOption(EventOption[] options, int[] willpowerCost, EventContext context, Event e)
 {
     string[] texts = new string[options.Length];
     for(int i = 0; i < options.Length; ++i)
     {
         if (willpowerCost[i] > 0)
         {
             texts[i] = EventHelper.ReplaceStrings(options[i].Label, context) + " (Cost: " + willpowerCost[i] + " WP)";
         }
         else
             texts[i] = EventHelper.ReplaceStrings(options[i].Label, context);
     }
     bool[] enabled = willpowerCost.Select(cost => cost <= WillPower).ToArray();
     TextTopBottomButton view = new TextTopBottomButton(context.GetCharacters(), this, e.CreateActionDescription(context), texts, enabled, notificator);
     main.LaunchView(view);
     return view.SelectedIndex;
 }
Exemple #2
0
 public virtual int OnChooseOption(EventOption[] options, int[] willpowerCost, EventContext context, Event e)
 {
     throw new NotImplementedException();
 }
Exemple #3
0
 public int ChooseOption(EventOption[] options, int[] willpowerCost, EventContext context, Event e)
 {
     return OnChooseOption(options, willpowerCost, context, e);
 }