Esempio n. 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);
 }
Esempio n. 2
0
        public static Timing Update(HudComponent component)
        {
            if (!Mod.DevMode)
            {
                return(null);
            }

            return(Components.TryGetValue(component, out var timing) ? timing : null);
        }
Esempio n. 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);
        }
Esempio n. 4
0
 public abstract bool Draw(HudComponent component, Rect rect);
Esempio n. 5
0
 public static void Remove(HudComponent component) => Components.Remove(component);
Esempio n. 6
0
 public static void Add(HudComponent component) => Components[component] = new Timing();