Beispiel #1
0
        void ConstructWidgets()
        {
            input = new ChatInputWidget(game, chatFont)
                    .SetLocation(Anchor.Min, Anchor.Max, 5, 5);
            altText = new SpecialInputWidget(game, chatFont, input);
            altText.Init();
            UpdateAltTextY();

            status = new TextGroupWidget(game, 5, chatFont, chatUrlFont)
                     .SetLocation(Anchor.Max, Anchor.Min, 0, 0);
            status.Init();
            status.SetUsePlaceHolder(0, false);
            status.SetUsePlaceHolder(1, false);

            bottomRight = new TextGroupWidget(game, 3, chatFont, chatUrlFont)
                          .SetLocation(Anchor.Max, Anchor.Max, 0, hud.BottomOffset + 15);
            bottomRight.Init();

            normalChat = new TextGroupWidget(game, chatLines, chatFont, chatUrlFont)
                         .SetLocation(Anchor.Min, Anchor.Max, 10, hud.BottomOffset + 15);
            normalChat.Init();

            clientStatus = new TextGroupWidget(game, game.Chat.ClientStatus.Length, chatFont, chatUrlFont)
                           .SetLocation(Anchor.Min, Anchor.Max, 10, hud.BottomOffset + 15);
            clientStatus.Init();

            announcement = TextWidget.Create(game, null, announcementFont)
                           .SetLocation(Anchor.Centre, Anchor.Centre, 0, -game.Height / 4);
        }
 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 + 15;
     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;
 }