Exemple #1
0
 void ConstructWidgets()
 {
     textInput         = new TextInputWidget(game, chatFont);
     textInput.YOffset = 5;
     status            = new TextGroupWidget(game, 5, chatFont, chatUrlFont,
                                             Anchor.BottomOrRight, Anchor.LeftOrTop);
     status.Init();
     status.SetUsePlaceHolder(0, false);
     status.SetUsePlaceHolder(1, false);
     bottomRight = new TextGroupWidget(game, 3, chatFont, chatUrlFont,
                                       Anchor.BottomOrRight, Anchor.BottomOrRight);
     bottomRight.YOffset = blockSize * 3 / 2;
     bottomRight.Init();
     normalChat = new TextGroupWidget(game, chatLines, chatFont, chatUrlFont,
                                      Anchor.LeftOrTop, Anchor.BottomOrRight);
     normalChat.XOffset = 10;
     normalChat.YOffset = blockSize + 15;
     normalChat.Init();
     clientStatus = new TextGroupWidget(game, game.Chat.ClientStatus.Length, chatFont,
                                        chatUrlFont, Anchor.LeftOrTop, Anchor.BottomOrRight);
     clientStatus.XOffset = 10;
     clientStatus.YOffset = blockSize + 15;
     clientStatus.Init();
     announcement = ChatTextWidget.Create(game, 0, 0, null,
                                          Anchor.Centre, Anchor.Centre, announcementFont);
     announcement.YOffset = -game.Height / 4;
 }
Exemple #2
0
 void DisposeExtendedHelp()
 {
     if (extendedHelp == null)
     {
         return;
     }
     extendedHelp.Dispose();
     extendedHelp = null;
 }
Exemple #3
0
        void MakeExtendedHelp(string[] desc)
        {
            extendedHelp = new TextGroupWidget(game, desc.Length, extendedHelpFont, null,
                                               Anchor.Centre, Anchor.Centre);
            extendedHelp.Init();

            for (int i = 0; i < desc.Length; i++)
            {
                extendedHelp.SetText(i, desc[i]);
            }
            for (int i = 0; i < desc.Length; i++)
            {
                extendedHelp.Textures[i].X1 = extendedHelp.X;
            }

            tableWidth  = extendedHelp.Width;
            tableHeight = extendedHelp.Height;
            extendedHelp.MoveTo(extendedHelp.X, extHelpY + tableHeight / 2);
        }
 void ConstructWidgets()
 {
     textInput = new TextInputWidget( game, chatFont, chatBoldFont );
     textInput.YOffset = blockSize + 5;
     status = new TextGroupWidget( game, 5, chatFont, chatUnderlineFont,
                                  Anchor.BottomOrRight, Anchor.LeftOrTop );
     status.Init();
     status.SetUsePlaceHolder( 0, false );
     status.SetUsePlaceHolder( 1, false );
     bottomRight = new TextGroupWidget( game, 3, chatFont, chatUnderlineFont,
                                       Anchor.BottomOrRight, Anchor.BottomOrRight );
     bottomRight.YOffset = blockSize * 3 / 2;
     bottomRight.Init();
     normalChat = new TextGroupWidget( game, chatLines, chatFont, chatUnderlineFont,
                                      Anchor.LeftOrTop, Anchor.BottomOrRight );
     normalChat.XOffset = 10;
     normalChat.YOffset = blockSize * 2 + 15;
     normalChat.Init();
     clientStatus = new TextGroupWidget( game, game.Chat.ClientStatus.Length, chatFont,
                                        chatUnderlineFont, Anchor.LeftOrTop, Anchor.BottomOrRight );
     clientStatus.XOffset = 10;
     clientStatus.YOffset = blockSize * 2 + 15;
     clientStatus.Init();
     announcement = ChatTextWidget.Create( game, 0, 0, null,
                                          Anchor.Centre, Anchor.Centre, announcementFont );
     announcement.YOffset = -game.Height / 4;
 }
        void MakeExtendedHelp( string[] desc )
        {
            extendedHelp = new TextGroupWidget( game, desc.Length, extendedHelpFont, null,
                                               Anchor.Centre, Anchor.Centre );
            extendedHelp.Init();

            for( int i = 0; i < desc.Length; i++ )
                extendedHelp.SetText( i, desc[i] );
            for( int i = 0; i < desc.Length; i++ )
                extendedHelp.Textures[i].X1 = extendedHelp.X;

            tableWidth = extendedHelp.Width;
            tableHeight = extendedHelp.Height;
            extendedHelp.MoveTo( extendedHelp.X, extHelpY + tableHeight / 2 );
        }
 void DisposeExtendedHelp()
 {
     if( extendedHelp == null ) return;
     extendedHelp.Dispose();
     extendedHelp = null;
 }