public static void BeautyOnGUI() { if (!Find.PlaySettings.showBeauty) { return; } if (!Gen.MouseCell().InBounds() || Gen.MouseCell().Fogged()) { return; } BeautyDrawer.tempCountedThings.Clear(); BeautyUtility.FillBeautyRelevantCells(Gen.MouseCell()); for (int i = 0; i < BeautyUtility.beautyRelevantCells.Count; i++) { IntVec3 intVec = BeautyUtility.beautyRelevantCells[i]; float num = BeautyUtility.CellBeauty(intVec, BeautyDrawer.tempCountedThings); if (num != 0f) { Vector3 v = GenWorldUI.LabelDrawPosFor(intVec); GenWorldUI.DrawThingLabel(v, Mathf.RoundToInt(num).ToStringCached(), BeautyDrawer.BeautyColor(num)); } } Text.Font = GameFont.Medium; Rect rect = new Rect(Event.current.mousePosition.x + 19f, Event.current.mousePosition.y + 19f, 100f, 100f); float beauty = BeautyUtility.AverageBeautyPerceptible(Gen.MouseCell()); GUI.color = BeautyDrawer.BeautyColor(beauty); Widgets.Label(rect, beauty.ToString("F1")); GUI.color = Color.white; }
public override void UIRootOnGUI() { this.CallAncestorUIRootOnGUI(); this.screenSizeMonitor.Update(); this.thingOverlays.ThingOverlaysOnGUI(); for (int i = 0; i < Find.Map.components.Count; i++) { Find.Map.components[i].MapComponentOnGUI(); } bool filtersCurrentEvent = this.screenshotMode.FiltersCurrentEvent; foreach (IRenderedComponent current in this.renderedComponents) { if (!filtersCurrentEvent || current.RenderWithScreenshots) { current.OnGUI(); } } BeautyDrawer.BeautyOnGUI(); this.selector.dragBox.DragBoxOnGUI(); DesignatorManager.DesignationManagerOnGUI(); this.targeter.TargeterOnGUI(); Find.TooltipGiverList.DispenseAllThingTooltips(); Find.ColonyInfo.ColonyInfoOnGUI(); DebugTools.DebugToolsOnGUI(); if (!this.screenshotMode.FiltersCurrentEvent) { this.globalControls.GlobalControlsOnGUI(); this.resourceReadout.ResourceReadoutOnGUI(); this.mainTabsRoot.MainTabsOnGUI(); this.mouseoverReadout.MouseoverReadoutOnGUI(); this.alerts.AlertsReadoutOnGUI(); ActiveTutorNoteManager.ActiveLessonManagerOnGUI(); } RoomStatsDrawer.RoomStatsOnGUI(); Find.DebugDrawer.DebugDrawerOnGUI(); this.windows.WindowStackOnGUI(); DesignatorManager.ProcessInputEvents(); this.targeter.ProcessInputEvents(); this.mainTabsRoot.HandleLowPriorityShortcuts(); this.selector.SelectorOnGUI(); this.OpenMainMenuShortcut(); }
public void OnGUI() { BeautyDrawer.BeautyOnGUI(); }