float RecursiveParentLocationz(Widget widget, ref float value) { if (widget.Parent == null) return value + widget.location.Y; else { value += widget.location.Y; return (RecursiveParentLocationz(widget.Parent, ref value)); } }
public void MatchWidgetToBounds(Widget widget) { var size = Client.window.Qfont.Measure(text); widget.SetBounds(null, null, size.Width*2f , size.Height*2f); }
public void MatchTextureBounds(Widget widget) { widget.size.X = Scale.hSizeScale(texture.Width) * 2 * Singleton<GUI>.INSTANCE.scale; widget.size.Y = Scale.vSizeScale(texture.Height)*2 * Singleton<GUI>.INSTANCE.scale; }