Beispiel #1
0
            public override void Draw(float position, float width, LogDrawData data)
            {
                float height = GetHeight(width);
                float width2 = width - 29f;
                Rect  rect   = new Rect(0f, position, width, height);

                if (log == data.highlightEntry)
                {
                    Widgets.DrawRectFast(rect, new Color(1f, 1f, 1f, HighlightAlpha * data.highlightIntensity));
                    data.highlightIntensity = Mathf.Max(0f, data.highlightIntensity - Time.deltaTime / HighlightDuration);
                }
                else if (data.alternatingBackground)
                {
                    Widgets.DrawRectFast(rect, new Color(1f, 1f, 1f, AlternateAlpha));
                }
                data.alternatingBackground = !data.alternatingBackground;
                Widgets.Label(new Rect(29f, position, width2, height), log.ToGameStringFromPOV(pawn));
                Texture2D texture2D = log.IconFromPOV(pawn);

                if (texture2D != null)
                {
                    Rect position2 = new Rect(0f, position + (height - 26f) / 2f, 26f, 26f);
                    GUI.DrawTexture(position2, texture2D);
                }
                Widgets.DrawHighlightIfMouseover(rect);
                TooltipHandler.TipRegion(rect, () => log.GetTipString(), 613261 + log.LogID * 2063);
                if (Widgets.ButtonInvisible(rect))
                {
                    log.ClickedFromPOV(pawn);
                }
                if (DebugViewSettings.logCombatLogMouseover && Mouse.IsOver(rect))
                {
                    log.ToGameStringFromPOV(pawn, forceLog: true);
                }
            }
 public override void Draw(float position, float width, LogDrawData data)
 {
     Text.Font = GameFont.Medium;
     Widgets.Label(new Rect(0f, position, width, GetHeight(width)), text);
     Text.Font = GameFont.Small;
 }
 public abstract void Draw(float position, float width, LogDrawData data);
 public override void Draw(float position, float width, LogDrawData data)
 {
 }