예제 #1
0
        public void GlobalControlsOnGUI()
        {
            if (Event.current.type == EventType.Layout)
            {
                return;
            }
            float num  = (float)UI.screenWidth - 200f;
            float num2 = (float)UI.screenHeight;

            num2 -= 35f;
            GenUI.DrawTextWinterShadow(new Rect((float)(UI.screenWidth - 270), (float)(UI.screenHeight - 450), 270f, 450f));
            num2 -= 4f;
            GlobalControlsUtility.DoPlaySettings(this.rowVisibility, false, ref num2);
            num2 -= 4f;
            GlobalControlsUtility.DoTimespeedControls(num, 200f, ref num2);
            num2 -= 4f;
            GlobalControlsUtility.DoDate(num, 200f, ref num2);
            Rect rect = new Rect(num - 30f, num2 - 26f, 230f, 26f);

            Find.CurrentMap.weatherManager.DoWeatherGUI(rect);
            num2 -= rect.height;
            Rect rect2 = new Rect(num - 100f, num2 - 26f, 293f, 26f);

            Text.Anchor = TextAnchor.MiddleRight;
            Widgets.Label(rect2, GlobalControls.TemperatureString());
            Text.Anchor = TextAnchor.UpperLeft;
            num2       -= 26f;
            float num3  = 230f;
            float num4  = Find.CurrentMap.gameConditionManager.TotalHeightAt(num3 - 15f);
            Rect  rect3 = new Rect(num - 30f, num2 - num4, num3, num4);

            Find.CurrentMap.gameConditionManager.DoConditionsUI(rect3);
            num2 -= rect3.height;
            if (Prefs.ShowRealtimeClock)
            {
                GlobalControlsUtility.DoRealtimeClock(num, 200f, ref num2);
            }
            TimedForcedExit component = Find.CurrentMap.Parent.GetComponent <TimedForcedExit>();

            if (component != null && component.ForceExitAndRemoveMapCountdownActive)
            {
                Rect rect4 = new Rect(num, num2 - 26f, 193f, 26f);
                Text.Anchor = TextAnchor.MiddleRight;
                GlobalControls.DoCountdownTimer(rect4, component);
                Text.Anchor = TextAnchor.UpperLeft;
                num2       -= 26f;
            }
            num2 -= 10f;
            Find.LetterStack.LettersOnGUI(num2);
        }
예제 #2
0
 public void GlobalControlsOnGUI()
 {
     if (Event.current.type != EventType.Layout)
     {
         float num  = (float)UI.screenWidth - 200f;
         float num2 = UI.screenHeight;
         num2 -= 35f;
         GenUI.DrawTextWinterShadow(new Rect(UI.screenWidth - 270, UI.screenHeight - 450, 270f, 450f));
         num2 -= 4f;
         GlobalControlsUtility.DoPlaySettings(rowVisibility, worldView: false, ref num2);
         num2 -= 4f;
         GlobalControlsUtility.DoTimespeedControls(num, 200f, ref num2);
         num2 -= 4f;
         GlobalControlsUtility.DoDate(num, 200f, ref num2);
         Rect rect = new Rect(num - 22f, num2 - 26f, 230f, 26f);
         Find.CurrentMap.weatherManager.DoWeatherGUI(rect);
         num2 -= rect.height;
         Rect rect2 = new Rect(num - 100f, num2 - 26f, 293f, 26f);
         Text.Anchor = TextAnchor.MiddleRight;
         Widgets.Label(rect2, TemperatureString());
         Text.Anchor = TextAnchor.UpperLeft;
         num2       -= 26f;
         float num3  = 154f;
         float num4  = Find.CurrentMap.gameConditionManager.TotalHeightAt(num3);
         Rect  rect3 = new Rect((float)UI.screenWidth - num3, num2 - num4, num3, num4);
         Find.CurrentMap.gameConditionManager.DoConditionsUI(rect3);
         num2 -= rect3.height;
         if (Prefs.ShowRealtimeClock)
         {
             GlobalControlsUtility.DoRealtimeClock(num, 200f, ref num2);
         }
         TimedDetectionRaids component = Find.CurrentMap.Parent.GetComponent <TimedDetectionRaids>();
         if (component != null && component.NextRaidCountdownActiveAndVisible)
         {
             Rect rect4 = new Rect(num, num2 - 26f, 193f, 26f);
             Text.Anchor = TextAnchor.MiddleRight;
             DoCountdownTimer(rect4, component);
             Text.Anchor = TextAnchor.UpperLeft;
             num2       -= 26f;
         }
         num2 -= 10f;
         Find.LetterStack.LettersOnGUI(num2);
     }
 }