public static TextWidget Create( Game game, int x, int y, string text, Docking horizontal, Docking vertical, Font font ) { TextWidget widget = new TextWidget( game, font ); widget.Init(); widget.HorizontalDocking = horizontal; widget.VerticalDocking = vertical; widget.XOffset = x; widget.YOffset = y; widget.SetText( text ); return widget; }
public override void Init() { fpsTextWidget = new TextWidget( game, font ); fpsTextWidget.Init(); fpsTextWidget.SetText( "FPS: no data yet" ); MakePosTextWidget(); hackStatesWidget = new TextWidget( game, posFont ); hackStatesWidget.YOffset = fpsTextWidget.Height + posHeight; hackStatesWidget.Init(); UpdateHackState( true ); }
public static TextWidget Create(Game game, int x, int y, string text, Anchor horizontal, Anchor vertical, Font font) { TextWidget widget = new TextWidget(game, font); widget.Init(); widget.HorizontalAnchor = horizontal; widget.VerticalAnchor = vertical; widget.XOffset = x; widget.YOffset = y; widget.SetText(text); return(widget); }
public override void Init() { textFont = new Font( "Arial", 14, FontStyle.Bold ); arrowFont = new Font( "Arial", 18, FontStyle.Bold ); titleFont = new Font( "Arial", 16, FontStyle.Bold ); title = TextWidget.Create( game, 0, -130, titleText, Anchor.Centre, Anchor.Centre, titleFont ); title.Init(); buttons = new ButtonWidget[] { MakeText( 0, -80, Get( 0 ) ), MakeText( 0, -40, Get( 1 ) ), MakeText( 0, 0, Get( 2 ) ), MakeText( 0, 40, Get( 3 ) ), MakeText( 0, 80, Get( 4 ) ), Make( -160, 0, "<", (g, w) => PageClick( false ) ), Make( 160, 0, ">", (g, w) => PageClick( true ) ), null, }; }
public override void Init() { font = new Font( "Arial", 13 ); posFont = new Font( "Arial", 12, FontStyle.Italic ); game.Events.ChatFontChanged += ChatFontChanged; fpsTextWidget = new ChatTextWidget( game, font ); fpsTextWidget.XOffset = 2; fpsTextWidget.YOffset = 2; fpsTextWidget.Init(); string fpsText = text.Length > 0 ? text.GetString() : "FPS: no data yet"; fpsTextWidget.SetText( fpsText ); MakePosTextWidget(); hackStatesWidget = new ChatTextWidget( game, posFont ); hackStatesWidget.XOffset = 2; hackStatesWidget.YOffset = fpsTextWidget.Height + posHeight + 2; hackStatesWidget.Init(); UpdateHackState( true ); }
public override void Init() { font = new Font(game.FontName, 13); posFont = new Font(game.FontName, 12, FontStyle.Italic); game.Events.ChatFontChanged += ChatFontChanged; fpsTextWidget = new ChatTextWidget(game, font); fpsTextWidget.XOffset = 2; fpsTextWidget.YOffset = 2; fpsTextWidget.Init(); string fpsText = text.Length > 0 ? text.GetString() : "FPS: no data yet"; fpsTextWidget.SetText(fpsText); MakePosTextWidget(); hackStatesWidget = new ChatTextWidget(game, posFont); hackStatesWidget.XOffset = 2; hackStatesWidget.YOffset = fpsTextWidget.Height + posHeight + 2; hackStatesWidget.Init(); UpdateHackState(true); }
public override void Init() { textFont = new Font("Arial", 14, FontStyle.Bold); arrowFont = new Font("Arial", 18, FontStyle.Bold); int size = game.Drawer2D.UseBitmappedChat ? 13 : 16; titleFont = new Font("Arial", size, FontStyle.Bold); title = TextWidget.Create(game, 0, -130, titleText, Anchor.Centre, Anchor.Centre, titleFont); title.Init(); buttons = new ButtonWidget[] { MakeText(0, -80, Get(0)), MakeText(0, -40, Get(1)), MakeText(0, 0, Get(2)), MakeText(0, 40, Get(3)), MakeText(0, 80, Get(4)), Make(-160, 0, "<", (g, w) => PageClick(false)), Make(160, 0, ">", (g, w) => PageClick(true)), null, }; }
public override void Init() { fpsTextWidget = new TextWidget( game, font ); fpsTextWidget.Init(); fpsTextWidget.SetText( "FPS: no data yet" ); }