public override void Init() { font = new Font(game.FontName, 14); posFont = new Font(game.FontName, 14, FontStyle.Italic); game.Events.ChatFontChanged += ChatFontChanged; fpsText = new ChatTextWidget(game, font); fpsText.XOffset = 2; fpsText.YOffset = 2; fpsText.ReducePadding = true; fpsText.Init(); string msg = text.Length > 0 ? text.GetString() : "FPS: no data yet"; fpsText.SetText(msg); MakePosTextWidget(); hackStates = new ChatTextWidget(game, posFont); hackStates.XOffset = 2; hackStates.YOffset = fpsText.Height + posTex.Height + 2; hackStates.ReducePadding = true; hackStates.Init(); UpdateHackState(true); }
public static new ChatTextWidget Create( Game game, int x, int y, string text, Anchor horizontal, Anchor vertical, Font font ) { ChatTextWidget widget = new ChatTextWidget( game, font ); widget.Init(); widget.HorizontalAnchor = horizontal; widget.VerticalAnchor = vertical; widget.XOffset = x; widget.YOffset = y; widget.SetText( text ); return widget; }
public static new ChatTextWidget Create(Game game, int x, int y, string text, Anchor horizontal, Anchor vertical, Font font) { ChatTextWidget widget = new ChatTextWidget(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() { font = new Font( game.FontName, 14 ); posFont = new Font( game.FontName, 14, FontStyle.Italic ); game.Events.ChatFontChanged += ChatFontChanged; fpsText = new ChatTextWidget( game, font ); fpsText.XOffset = 2; fpsText.YOffset = 2; fpsText.ReducePadding = true; fpsText.Init(); string msg = text.Length > 0 ? text.GetString() : "FPS: no data yet"; fpsText.SetText( msg ); MakePosTextWidget(); hackStates = new ChatTextWidget( game, posFont ); hackStates.XOffset = 2; hackStates.YOffset = fpsText.Height + posTex.Height + 2; hackStates.ReducePadding = true; hackStates.Init(); UpdateHackState( true ); }