Example #1
0
        public void Render(TimeSpan elapsedGameTime)
        {
            mainLayer.Begin();


            mainLayer.Save();
            mainLayer.DrawRectangle(new Color(0, 0, 0), 0, 0, _width, _height);

            mainLayer.DrawImage(LobbyOverlay, LobbyOverlayPosition.X, LobbyOverlayPosition.Y);
            mainLayer.DrawImage(ProfileOverlay, ProfileOverlayPosition.X, ProfileOverlayPosition.Y);
            mainLayer.DrawImage(GoldCoinOverlay, GoldCoinOverlayPosition.X, GoldCoinOverlayPosition.Y);
            mainLayer.DrawImage(SilverCoinOverlay, SilverCoinOverlayPosition.X, SilverCoinOverlayPosition.Y);

            mainLayer.DrawImage(LobbyBackground, LobbyBackgroundPosition.X, LobbyBackgroundPosition.Y);


            headerButtonGroup(mainLayer, HeaderButtonTop.AllRooms, SelectedHeaderButton == HeaderButtonTop.AllRooms);
            headerButtonGroup(mainLayer, HeaderButtonTop.Featured, SelectedHeaderButton == HeaderButtonTop.Featured);
            headerButtonGroup(mainLayer, HeaderButtonTop.Favorites, SelectedHeaderButton == HeaderButtonTop.Favorites);

            createRoomButtonGroup(mainLayer);
            rooms(mainLayer, RoomButtonSize.Width, RoomButtonSize.Height);

            mainLayer.DrawImage(ScrollBarOverlay, ScrollBarPosition.X, ScrollBarPosition.Y);
            mainLayer.DrawImage(ScrollBarButtonOverlay, ScrollBarPosition.X + 4, ScrollBarPosition.Y + (ScrollBarButtonPosition));

            mainLayer.Restore();
            mainLayer.End();
        }
Example #2
0
 public void Render(TimeSpan elapsedGameTime)
 {
     mainLayer.Begin();
     mainLayer.Save();
     mainLayer.DrawRectangle(new Color(58, 58, 148), 0, 0, _width, _height);
     mainLayer.Restore();
     mainLayer.End();
 }
Example #3
0
        public void Render(ILayer layer)
        {
#if DRAWTOUCH
            foreach (var touchRect in touchRects)
            {
                layer.DrawRectangle(new Color(22, 40, 120, 150), touchRect.X, touchRect.Y, touchRect.Width, touchRect.Height);
            }
#endif
        }
Example #4
0
        private void rooms(ILayer layer, int buttonWidth, int buttonHeight)
        {
            layer.Save();
            layer.Translate(RoomsPosition.X, RoomsPosition.Y);



            for (int i = 0; i < NumberOfRoomsVisible; i++)
            {
                layer.Save();
                layer.Translate(0, buttonHeight * i);
                layer.DrawRectangle(i % 2 == 0 ? RoomButtonColor : AlternateRoomButtonColor, 0, 0, buttonWidth, buttonHeight);

                if ((i + TopRoomIndex) < Rooms.Count)
                {
                    var currentRoom = Rooms[i + TopRoomIndex];
                    /*todo layer.DrawString("lobby.font", "Hello " + currentRoom.Name, 50, 50);*/
                }
                layer.Restore();
            }

            layer.Restore();
        }
        private void drawBingoCard(BingoCard card, Point cardPosition)
        {
            mainLayer.Save();
            mainLayer.Translate(cardPosition.X, cardPosition.Y);

            mainLayer.DrawImage(BingoCard, 0, 0);

            mainLayer.Save();
            mainLayer.Translate(31, 28);
            for (int x = 0; x < BingoGame.BingoCard.NumbersWide; x++)
            {
                for (int y = 0; y < BingoGame.BingoCard.NumbersHigh; y++)
                {
                    var bingoCardNumber = card.GetNumberAt(x, y);

                    var color = BingoCardNumber.ColorToColor(bingoCardNumber.Color);

                    mainLayer.DrawRectangle(color, x * 33, y * 34, 30, 30);
                    mainLayer.DrawImage(_renderer.GetImage("leftBoard.numbers.white." + bingoCardNumber.Number), x * 33 + 1, y * 34 + 8);
                }
            }
            mainLayer.Restore();
            mainLayer.Restore();
        }