예제 #1
0
    /// <summary>
    /// Adds the option toggles to the given ActionBar.
    /// </summary>
    public static void AddToggles(ActionBar bar)
    {
        foreach (IRoleFillerRule rule in AllRules)
        {
            IRoleFillerRule local = rule;
            bar.AddToggle(local.Name, (bool b) => MarkActive(local, b), ActiveRules.Contains(local));
        }

    }
예제 #2
0
 private void Init()
 {
     importSelection = new ActionBar(false, true, false);
     //Add all available narratives to the selection of available files.
     foreach (string name in serializer.OfferNames())
     {
         string localName = name;
         importSelection.AddToggle(name, (bool val) =>
         {
             if (val)
             {
                 importFileName = exportFileName = localName;
             }
             else
             {
                 importFileName = null;
             }
         });
     }
     path = serializer.DirectoryPath;
 }
예제 #3
0
 /// <summary>
 /// Creates a new EventSchedulerWindow.
 /// </summary>
 public EventSchedulerWindow()
 {
     IEnumerable<EventSignature> allSignatures = EventLibrary.Instance.GetSignatures();
     allSignatures = allSignatures.Where((EventSignature sig) => !sig.AffectsWorldState());
     foreach (EventSignature sig in allSignatures)
     {
         allEvents.Add(new SchedulerEventArguments(sig, 0.0f, false));
     }
     existingCollectionSelector = new ActionBar(true, true, false);
     foreach(EventCollection collection in EventCollectionManager.Instance.AllCollections)
     {
         EventCollection localCollection = collection;
         existingCollectionSelector.AddToggle(collection.Name, 
             (bool b) => 
             {
                 if (b) Set(localCollection);
             });
     }
 }
예제 #4
0
 /// <summary>
 /// The default bar for selecting a new crowd.
 /// </summary>
 private ActionBar SelectCrowdBar()
 {
     ActionBar result = new ActionBar(true);
     result.AddToggle("Crowd Static", (bool b) => crowdStatic = b);
     result.AddButton("Cancel", Reset);
     return result;
 }