Esempio n. 1
0
    public override string CompInspectStringExtra()
    {
        if (!BestMixUtility.IsValidForComp(parent))
        {
            return(null);
        }

        var ModeDisplay = BestMixUtility.GetBMixModeDisplay(CurMode);

        return("BestMix.CurrentMode".Translate(ModeDisplay));
    }
Esempio n. 2
0
    private void DoModeSelMenu()
    {
        var list = new List <FloatMenuOption>();

        string text = "BestMix.DoNothing".Translate();

        list.Add(new FloatMenuOption(text, delegate { SetBMixMode(this, null, false); },
                                     MenuOptionPriority.Default, null, null, 29f));

        foreach (var mode in BestMixUtility.BMixModes())
        {
            text = BestMixUtility.GetBMixModeDisplay(mode);
            list.Add(new FloatMenuOption(text, delegate { SetBMixMode(this, mode, true); },
                                         MenuOptionPriority.Default, null, null, 29f));
        }

        var sortedlist = list.OrderBy(bm => bm.Label).ToList();

        Find.WindowStack.Add(new FloatMenu(sortedlist));
    }