public void WorldGlobalControlsOnGUI() { if (Event.current.type != EventType.Layout) { float num = (float)UI.screenWidth - 200f; float num2 = (float)UI.screenHeight - 4f; if (Current.ProgramState == ProgramState.Playing) { num2 -= 35f; } Profiler.BeginSample("World play settings"); GlobalControlsUtility.DoPlaySettings(this.rowVisibility, true, ref num2); Profiler.EndSample(); if (Current.ProgramState == ProgramState.Playing) { num2 -= 4f; Profiler.BeginSample("Timespeed controls"); GlobalControlsUtility.DoTimespeedControls(num, 200f, ref num2); Profiler.EndSample(); if (Find.CurrentMap != null || Find.WorldSelector.AnyObjectOrTileSelected) { num2 -= 4f; Profiler.BeginSample("Date"); GlobalControlsUtility.DoDate(num, 200f, ref num2); Profiler.EndSample(); } Profiler.BeginSample("World conditions"); float num3 = 230f; float num4 = Find.World.gameConditionManager.TotalHeightAt(num3 - 15f); Rect rect = new Rect(num - 30f, num2 - num4, num3, num4); Find.World.gameConditionManager.DoConditionsUI(rect); num2 -= rect.height; Profiler.EndSample(); } if (Prefs.ShowRealtimeClock) { Profiler.BeginSample("RealtimeClock"); GlobalControlsUtility.DoRealtimeClock(num, 200f, ref num2); Profiler.EndSample(); } Profiler.BeginSample("Distance measure"); Find.WorldRoutePlanner.DoRoutePlannerButton(ref num2); Profiler.EndSample(); if (!Find.PlaySettings.lockNorthUp) { Profiler.BeginSample("Compass"); CompassWidget.CompassOnGUI(ref num2); Profiler.EndSample(); } if (Current.ProgramState == ProgramState.Playing) { Profiler.BeginSample("Letters"); num2 -= 10f; Find.LetterStack.LettersOnGUI(num2); Profiler.EndSample(); } } }
public void WorldGlobalControlsOnGUI() { if (Event.current.type == EventType.Layout) { return; } float leftX = (float)UI.screenWidth - 200f; float curBaseY = (float)UI.screenHeight - 4f; if (Current.ProgramState == ProgramState.Playing) { curBaseY -= 35f; } GlobalControlsUtility.DoPlaySettings(rowVisibility, worldView: true, ref curBaseY); if (Current.ProgramState == ProgramState.Playing) { curBaseY -= 4f; GlobalControlsUtility.DoTimespeedControls(leftX, 200f, ref curBaseY); if (Find.CurrentMap != null || Find.WorldSelector.AnyObjectOrTileSelected) { curBaseY -= 4f; GlobalControlsUtility.DoDate(leftX, 200f, ref curBaseY); } float num = 154f; float num2 = Find.World.gameConditionManager.TotalHeightAt(num); Rect rect = new Rect((float)UI.screenWidth - num, curBaseY - num2, num, num2); Find.World.gameConditionManager.DoConditionsUI(rect); curBaseY -= rect.height; } if (Prefs.ShowRealtimeClock) { GlobalControlsUtility.DoRealtimeClock(leftX, 200f, ref curBaseY); } Find.WorldRoutePlanner.DoRoutePlannerButton(ref curBaseY); if (!Find.PlaySettings.lockNorthUp) { CompassWidget.CompassOnGUI(ref curBaseY); } if (Current.ProgramState == ProgramState.Playing) { curBaseY -= 10f; Find.LetterStack.LettersOnGUI(curBaseY); } }
public void WorldGlobalControlsOnGUI() { if (Event.current.type == EventType.Layout) { return; } float num = (float)UI.screenWidth - 200f; float num2 = (float)UI.screenHeight - 4f; if (Current.ProgramState == ProgramState.Playing) { num2 -= 35f; } GlobalControlsUtility.DoPlaySettings(this.rowVisibility, true, ref num2); if (Current.ProgramState == ProgramState.Playing) { num2 -= 4f; GlobalControlsUtility.DoTimespeedControls(num, 200f, ref num2); if (Find.VisibleMap != null || Find.WorldSelector.AnyObjectOrTileSelected) { num2 -= 4f; GlobalControlsUtility.DoDate(num, 200f, ref num2); } float num3 = 230f; float num4 = Find.World.gameConditionManager.TotalHeightAt(num3 - 15f); Rect rect = new Rect(num - 30f, num2 - num4, num3, num4); Find.World.gameConditionManager.DoConditionsUI(rect); num2 -= rect.height; } if (Prefs.ShowRealtimeClock) { GlobalControlsUtility.DoRealtimeClock(num, 200f, ref num2); } Find.WorldRoutePlanner.DoRoutePlannerButton(ref num2); if (!Find.PlaySettings.lockNorthUp) { CompassWidget.CompassOnGUI(ref num2); } if (Current.ProgramState == ProgramState.Playing) { num2 -= 10f; Find.LetterStack.LettersOnGUI(num2); } }