示例#1
0
 static void MarkButton(Listing_Toggles view, string group)
 {
     if (ActiveGroup.Equals(group))
     {
         GUI.color = ClickedColor;
     }
     if (view.ButtonText(group.Translate()))
     {
         ActiveGroup = group;
     }
     GUI.color = DefaultColor;
 }
示例#2
0
 // Middle view
 static void DoMiddle(Rect middleRect)
 {
     if (!ActiveGroup.NullOrEmpty())
     {
         if (ActiveGroup.Equals(ButtonCat.MetaModSettings))
         {
             DoMetaSettingsView(middleRect);
         }
         else
         {
             DoToggleView(middleRect);
         }
     }
 }
示例#3
0
        // Right view
        static void DoRight(Rect rightRect)
        {
            // Logged letters
            if (ActiveGroup.Equals(ButtonCat.Letters))
            {
                List <string> loggedLetters = Letter_Patch.LoggedLetters;
                float         rightY        = (loggedLetters.Count() + 2) * 25f;
                var           rightView     = new Listing_Toggles();
                rightView.BeginListing(rightRect, ref scrollPositionRight, rightY);
                rightView.CustomLabel("LoggedLetters".Translate(), -1, "LoggedLettersDesc".Translate());

                foreach (string letter in loggedLetters)
                {
                    if (rightView.CustomButtonText(letter))
                    {
                        Letter_Patch.AddRawLetter(letter);
                    }
                }

                rightView.EndListing();
            }

            // Alert me later
            if (ActiveGroup.Equals(ButtonCat.Alerts))
            {
                float rightY    = 10 * 25f;
                var   rightView = new Listing_Toggles();
                rightView.BeginListing(rightRect, ref scrollPositionRight, rightY);

                int alertSleepHours = AlertsReadout_Patch.hourMultiplier;
                rightView.CustomLabel("AlertMeLater".Translate(), -1, "AlertMeLaterDesc".Translate(alertSleepHours));
                rightView.GapLine();

                rightView.CustomLabel("AlertSleepCount".Translate(alertSleepHours));
                AlertsReadout_Patch.hourMultiplier = Mathf.RoundToInt(rightView.Slider((float)alertSleepHours, 1f, 24f));;
                rightView.EndListing();
            }
        }