Exemplo n.º 1
0
 public static 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);
        }
Exemplo n.º 3
0
        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 );
        }
Exemplo n.º 4
0
        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);
        }