Ejemplo n.º 1
0
        public override void LoadContent()
        {
            // Longable regions
            _lobbyChatRecs         = new RecSourceCollection();
            _lobbyChatRecs.Sources = new List <Rectangle>()
            {
                new Rectangle(0, 0, 68, 111), // Left
                new Rectangle(68, 0, 1, 111), // Middle
                new Rectangle(116, 0, 7, 111) // Right
            };
            // Creates longable
            _lobbyChatBg             = new LongebleSprite(_lobbyChatRecs, (_lobbyChatBgTexture = Content.Load <Texture2D>("ui/lobbyChatBg")), SpriteBatch);
            _lobbyChatBg.SpriteWidth = (int)Settings.GameWindowRealSize.X;
            // Font for the chat title
            _lobbyTitle       = new Font(Content.Load <SpriteFont>("fonts/goldfish_font"), SpriteBatch);
            _lobbyTitle.Color = new Color(39, 55, 78);
            _lobbyTitle.Text  = "Lobby";
            // Split the screen height in two minus chat height without the title
            int height = (int)Math.Ceiling((Settings.GameWindowRealSize.Y - 93) / 2);

            // Create backgrounds
            _lobbyBg1 = new Sprite(Primitives.Rectangle((int)Settings.GameWindowRealSize.X, height, new Color(210, 211, 222)), SpriteBatch);
            _lobbyBg2 = new Sprite(Primitives.Rectangle((int)Settings.GameWindowRealSize.X, height, new Color(193, 194, 209)), SpriteBatch);
            Adjust();
        }
Ejemplo n.º 2
0
 public override void LoadContent()
 {
     // Longeble chat background
     _lobbyChatRecs         = new RecSourceCollection();
     _lobbyChatRecs.Sources = new List <Rectangle>()
     {
         new Rectangle(125, 25, 4, 80), // Left
         new Rectangle(129, 25, 1, 80), // Middle
         new Rectangle(129, 25, 1, 80)  // Right
     };
     // Create longeble
     _lobbyChatBg = new LongebleSprite(_lobbyChatRecs, (_lobbyChatBgTexture = Content.Load <Texture2D>("ui/lobbyChatBg")), SpriteBatch);
     // Longeble size, game width minus chat paddings
     _lobbyChatBg.SpriteWidth = (int)Settings.GameWindowRealSize.X - 14;
     Adjust();
 }