protected override void ContextRecreated() { line1 = new TextWidget(game) .SetLocation(Anchor.Min, Anchor.Min, 2, 2); line1.ReducePadding = true; string msg = statusBuffer.Length > 0 ? statusBuffer.ToString() : "FPS: no data yet"; line1.Set(msg, font); posAtlas = new TextAtlas(game, 16); posAtlas.Pack("0123456789-, ()", font, "Position: "); posAtlas.tex.Y = (short)(line1.Height + 2); int yOffset = line1.Height + posAtlas.tex.Height + 2; line2 = new TextWidget(game) .SetLocation(Anchor.Min, Anchor.Min, 2, yOffset); line2.ReducePadding = true; if (game.ClassicMode) { // Swap around so 0.30 version is at top line2.YOffset = 2; line1.YOffset = posAtlas.tex.Y; line2.Set("0.30", font); line1.Reposition(); line2.Reposition(); } else { UpdateHackState(); } }
public override void OnResize() { titleWidget.Reposition(); messageWidget.Reposition(); reconnect.Reposition(); clearTime = DateTime.UtcNow.AddSeconds(0.5); }
public override void OnResize(int width, int height) { if (descWidget != null) { descWidget.Reposition(); } base.OnResize(width, height); }
TextWidget MakeLabel(int x, int y, string text) { TextWidget label = TextWidget.Create(game, text, regularFont) .SetLocation(Anchor.Centre, Anchor.Centre, x, y); label.XOffset = -110 - label.Width / 2; label.Reposition(); label.Colour = new FastColour(224, 224, 224); return(label); }
public override void OnResize(int width, int height) { RepositionWidgets(buttons); title.Reposition(); }
public override void OnResize(int width, int height) { messageWidget.Reposition(); titleWidget.Reposition(); }
public override void OnResize() { messageWidget.Reposition(); titleWidget.Reposition(); }
public override void OnResize() { titleWidget.Reposition(); messageWidget.Reposition(); reconnect.Reposition(); }