Ejemplo n.º 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;
 }
 public AltTextInputWidget(Game game, Font font, TextInputWidget parent) : base(game)
 {
     HorizontalAnchor = Anchor.LeftOrTop;
     VerticalAnchor   = Anchor.BottomOrRight;
     this.font        = font;
     this.parent      = parent;
     Active           = false;
 }
 public AltTextInputWidget( Game game, Font font, TextInputWidget parent )
     : base(game)
 {
     HorizontalAnchor = Anchor.LeftOrTop;
     VerticalAnchor = Anchor.BottomOrRight;
     this.font = font;
     this.parent = parent;
     Active = false;
 }
Ejemplo n.º 4
0
 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;
 }