Exemple #1
0
 public override bool Draw(HudComponent component, Rect rect)
 {
     GUIPlus.SetColor(Theme.LineColor.Value);
     Widgets.DrawLineHorizontal(rect.x, rect.y + (rect.height / 2f), rect.width);
     GUIPlus.ResetColor();
     return(true);
 }
Exemple #2
0
        public static Timing Update(HudComponent component)
        {
            if (!Mod.DevMode)
            {
                return(null);
            }

            return(Components.TryGetValue(component, out var timing) ? timing : null);
        }
Exemple #3
0
        public override bool Draw(HudComponent component, Rect rect)
        {
            HudTimings.Update(component)?.Start();

            var result = DoDraw(rect);

            HudTimings.Update(component)?.Finish(rect);

            return(result);
        }
Exemple #4
0
 public abstract bool Draw(HudComponent component, Rect rect);
Exemple #5
0
 public static void Remove(HudComponent component) => Components.Remove(component);
Exemple #6
0
 public static void Add(HudComponent component) => Components[component] = new Timing();