Пример #1
0
        public void Draw(Renderer sb)
        {
            // Draw frame & background
            sb.Draw(Assets.TransparentBox, m_Rect, Color.DarkGray);
            sb.Draw(Assets.TransparentBox, m_Rect, Color.DarkGray);
            sb.Draw(Assets.TransparentBox, m_Rect, Color.DarkGray);

            m_LevelLabel.Draw(sb);
            m_Level.Draw(sb);
            m_ExpBar.Draw(sb);
            m_ExpText.Draw(sb);

            m_LevelsAreaFrame.Draw(sb);
            m_BtnLeft.Draw(sb);
            m_BtnRight.Draw(sb);

            m_DetailsLevelLabel.Draw(sb);
            m_DetailsRequiredPoints.Draw(sb);
            m_HintsLabel.Draw(sb);
            m_Hints.Draw(sb);
            m_MegaHintsLabel.Draw(sb);
            m_MegaHints.Draw(sb);
            m_UndoSizeLabel.Draw(sb);
            m_UndoSize.Draw(sb);
            m_ExpBonusLabel.Draw(sb);
            m_ExpBonus.Draw(sb);
            m_DisableTimer.Draw(sb);
            m_DisableExpBonus.Draw(sb);
            m_ErrorDetector.Draw(sb);
            m_ErrorDetector2.Draw(sb);

            m_Close.Draw(sb);
        }
Пример #2
0
        void DrawFloorScroll(Renderer sb)
        {
            // Draw floors
            if (m_bFloorDataRetrieved)
            {
                Rectangle r = sb.ScissorRectangle;
                sb.ScissorRectangle = m_FloorScrollRect;
                float y = m_FloorScrollRect.Top + m_FloorScrollPosition;
                foreach (FloorDisplay floor in m_Floors)
                {
                    floor.Draw(sb, (int)y, 1.0f);
                    y += floor.Height;
                }
                sb.ScissorRectangle = r;
            }
            else
            {
                // Draw wait icon
                Assets.WaitIcon.Draw(sb, m_FloorWaitRectangle, Color.White);
                m_FloorDataFetchText.Draw(sb);
            }

            // Draw frame
            m_ScrollFrame.Draw(sb);
        }
Пример #3
0
        void DrawInstructions(Renderer sb)
        {
            if (m_InstructionFrame != null)
            {
                // Draw background
                sb.Draw(Assets.TransGray, m_InstructionRect, Color.White);

                // Draw Frame
                m_InstructionFrame.Draw(sb);

                // Draw Text
                int iY = m_InstructionRect.Top + m_iTextMarginTopBottom;
                int iX = m_InstructionRect.Left + m_iTextMarginLeftRight;
                foreach (FormattedLine line in m_Lines)
                {
                    line.Draw(sb, Assets.HelpFont, new Vector2(iX, iY), m_TextColor);
                    iY += m_iTextLineHeight;
                }

                if (m_OKButton != null)
                {
                    m_OKButton.Draw(sb);
                }
            }
        }
Пример #4
0
        public void Draw(SpriteBatch sb)
        {
            // Draw frame
            sb.Draw(Assets.TransGray, m_Rect, Color.White);
            sb.Draw(Assets.TransGray, m_Rect, Color.White);
            sb.Draw(Assets.TransGray, m_Rect, Color.White);
            m_Frame.Draw(sb);

            // Draw Buttons
            foreach (UIButton b in m_Buttons)
            {
                b.Draw(sb);
            }
        }
Пример #5
0
        void DrawProducts(SpriteBatch sb)
        {
            Rectangle r = sb.GraphicsDevice.ScissorRectangle;

            sb.GraphicsDevice.ScissorRectangle = m_ScrollRect;
            float y = m_ScrollRect.Top - m_ScrollPosition;

            foreach (ProductDisplay p in m_Products)
            {
                p.Draw(sb, (int)y);
                y += p.Height;
            }
            sb.GraphicsDevice.ScissorRectangle = r;

            // Draw frame
            m_ScrollFrame.Draw(sb);
        }
Пример #6
0
        void DrawProducts(Renderer sb)
        {
            Rectangle r = sb.ScissorRectangle;

            sb.ScissorRectangle = m_ScrollRect;
            float y = m_ScrollRect.Top - m_ScrollPosition;

            foreach (ProductDisplay p in m_Products)
            {
                p.Draw(sb, (int)y);
                y += p.Height;
            }
            sb.ScissorRectangle = r;

            // Draw frame
            m_ScrollFrame.Draw(sb);
        }
Пример #7
0
        public void Draw(SpriteBatch sb)
        {
            // Draw the box
            sb.Draw(Assets.TransGray, m_InputRect, m_bEnabled ? Color.White : Color.Gray);

            // Draw the text
            Happiness.ShadowString(sb, Assets.HelpFont, m_bMaskedText ? m_szMaskedText : m_szInputText, new Vector2(m_InputRect.Left + 4, m_InputRect.Top), m_bEnabled ? Color.White : Color.Gray);

            // Draw the cursor
            if (m_bShowCursor && m_bFocused && m_bEnabled)
            {
                Vector2 textSize   = Assets.HelpFont.MeasureString(m_bMaskedText ? m_szMaskedText : m_szInputText);
                int     cursorLeft = m_InputRect.Left + 4 + (int)textSize.X;
                sb.Draw(Assets.GoldBarVertical, new Rectangle(cursorLeft, m_InputRect.Top + 2, 2, m_InputRect.Height - 4), Color.White);
            }

            // Draw outline
            if (m_bFocused && m_bEnabled)
            {
                m_FocusFrame.Draw(sb);
            }
        }
Пример #8
0
        public void Draw(SpriteBatch sb, int y)
        {
            float center = (m_fHeight * 0.5f);

            // Background
            sb.Draw(Assets.TransGray, new Rectangle(m_iLeft, y, m_iWidth, (int)m_fHeight), m_bSelected ? Color.White : Color.Gray);

            sb.Draw(Assets.GoldBarHorizontal, new Rectangle(m_iLeft, y, m_iWidth, 1), Color.Black);
            sb.Draw(Assets.GoldBarHorizontal, new Rectangle(m_iLeft, y + (int)(m_fHeight - 1), m_iWidth, 1), Color.Black);

            int frameLeft   = (int)(Constants.ProductDisplay_FrameLeft * Happiness.Game.ScreenWidth);
            int frameWidth  = m_iWidth - (frameLeft * 2);
            int frameHeight = (int)(m_fHeight / 1.5f);

            m_Frame = new UIFrame(3, new Rectangle(m_iLeft + frameLeft, y + (int)(center - (frameHeight >> 1)), frameWidth, frameHeight));
            m_Frame.Draw(sb);

            // Gold Icon
            sb.Draw(Assets.GoldCoin, new Rectangle(m_rIcon.Left, m_rIcon.Top + y, m_rIcon.Width, m_rIcon.Height), Color.White);

            m_Coins.PositionY = (int)((y + center) - m_fCoinsHeight);
            m_Coins.Draw(sb);

            m_CoinsLabel.PositionX = m_Coins.PositionX + m_Coins.Width + 5;
            m_CoinsLabel.PositionY = (m_Coins.PositionY + m_Coins.Height) - (m_CoinsLabel.Height + 2);
            m_CoinsLabel.Draw(sb);

            m_VIP.PositionY = (int)((y + center) - m_fCoinsHeight);
            m_VIP.Draw(sb);

            m_VIPLabel.PositionX = m_VIP.PositionX + m_VIP.Width + 5;
            m_VIPLabel.PositionY = (m_VIP.PositionY + m_VIP.Height) - (m_VIPLabel.Height + 2);
            m_VIPLabel.Draw(sb);

            int buttonHeight = (int)(Constants.ProductDisplay_ButtonHeight * Happiness.Game.ScreenHeight);

            m_Purchase.SetY((y + (int)center) - (buttonHeight >> 1));
            m_Purchase.Draw(sb);
        }