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); }
public static Timing Update(HudComponent component) { if (!Mod.DevMode) { return(null); } return(Components.TryGetValue(component, out var timing) ? timing : null); }
public override bool Draw(HudComponent component, Rect rect) { HudTimings.Update(component)?.Start(); var result = DoDraw(rect); HudTimings.Update(component)?.Finish(rect); return(result); }
public abstract bool Draw(HudComponent component, Rect rect);
public static void Remove(HudComponent component) => Components.Remove(component);
public static void Add(HudComponent component) => Components[component] = new Timing();