void DrawEmailInput(Renderer sb) { // Draw email field m_Email.Draw(sb); Happiness.ShadowString(sb, Assets.HelpFont, m_szEmailText, m_vEmailLabelPosition, Color.LightGray); // Draw password field m_Password.Draw(sb); Happiness.ShadowString(sb, Assets.HelpFont, m_szPasswordText, m_vPasswordLabelPosition, Color.LightGray); // Draw confirm password field if (m_bEmailCreate) { m_Password2.Draw(sb); Happiness.ShadowString(sb, Assets.HelpFont, m_szPasswordText2, m_vPassword2LabelPosition, Color.LightGray); } Happiness.ShadowString(sb, Assets.DialogFont, m_szAccountStatusText, m_vAccountStatusPosition, Color.Goldenrod); m_AccountStatusButton.Draw(sb); foreach (UIButton b in m_DialogButtons) { b.Draw(sb); } }
public override void Draw(SpriteBatch spriteBatch) { // Draw background spriteBatch.Draw(Assets.Background, new Rectangle(0, 0, Game.ScreenWidth, Game.ScreenHeight), Color.White); // Draw Logo spriteBatch.Draw(Assets.Logo, m_LogoRectangle, Color.White); // Draw Credits Happiness.ShadowString(spriteBatch, Assets.MenuFont, m_szCreditLine, m_vCreditPosition, Color.Goldenrod); Happiness.ShadowString(spriteBatch, Assets.DialogFont, m_szMusicCreditLine, m_vMusicCreditPosition, Color.LightGray); Happiness.ShadowString(spriteBatch, Assets.DialogFont, m_szArtistCreditLine, m_vArtistCreditPosition, Color.LightGray); // Show sign in dialog if (m_SignInDialog != null) { m_SignInDialog.Draw(spriteBatch); } if (m_szWaitText != null) { Assets.WaitIcon.Draw(spriteBatch, m_WaitRect, Color.White); Happiness.ShadowString(spriteBatch, Assets.HelpFont, m_szWaitText, Happiness.CenterText(m_WaitTextCenter, m_szWaitText, Assets.HelpFont), Color.White); } }
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); // Draw the title Happiness.ShadowString(sb, Assets.MenuFont, m_szTitleText, m_vTitlePosition, Color.Goldenrod); if (m_szStatusText != null) { Happiness.ShadowString(sb, Assets.HelpFont, m_szStatusText, m_vStatusPosition, Color.Red); } switch (m_Mode) { case Mode.SignInButtons: foreach (UIButton button in m_SignInButtons) { button.Draw(sb); } break; case Mode.EmailInput: DrawEmailInput(sb); break; } }
public void Draw(Renderer sb) { if (!m_bHidden) { Happiness.ShadowString(sb, m_Font, m_szText, m_vPosition, m_Color); } }
public void Draw(SpriteBatch sb) { if (!m_bHidden) { Happiness.ShadowString(sb, m_Font, m_szText, m_vPosition, m_Color); } }
public void Draw(SpriteBatch sb) { sb.Draw(Assets.CheckBox, new Rectangle(m_Rect.Left, m_Rect.Top, m_iCheckboxSize, m_iCheckboxSize), m_bEnabled ? Color.White : Color.Gray); if (m_bChecked) { sb.Draw(Assets.Check, new Rectangle(m_Rect.Left, m_Rect.Top, m_iCheckboxSize, m_iCheckboxSize), m_bEnabled ? Color.White : Color.Gray); } Happiness.ShadowString(sb, Assets.HelpFont, m_szText, m_TextLocation, m_bEnabled ? m_TextColor : m_TextDisabledColor); }
public void Draw(Renderer sb) { // Draw the icon sb.Draw(m_Icon, m_Rect, m_bLocked ? Color.DarkGray : Color.White); if (m_bLocked) { sb.Draw(Assets.NotOverlay, m_Rect, Color.White); } Happiness.ShadowString(sb, Assets.DialogFont, m_szSize, m_vSizePosition, Color.Goldenrod); Happiness.ShadowString(sb, Assets.DialogFont, m_szFloor, m_vFloorPosition, Color.White); }
public virtual void Draw(SpriteBatch sb) { // Draw Bar sb.Draw(m_BarTexture, m_BarRect, Color.White); // Draw cursor float barWidth = m_BarRect.Width; float xdelta = m_BarRect.Left + (Percentage * barWidth); m_CursorRect.X = (int)xdelta - (m_CursorRect.Width >> 1); sb.Draw(m_CursorTexture, m_CursorRect, Color.White); // Draw text if (m_szText != null) { Happiness.ShadowString(sb, m_Font, m_szText, m_vTextPosition, Color.White); } }
public void Draw(Renderer sb) { // Draw frame sb.Draw(Assets.TransparentBox, m_Rect, Color.SteelBlue); sb.Draw(Assets.TransparentBox, m_Rect, Color.SteelBlue); sb.Draw(Assets.TransparentBox, m_Rect, Color.SteelBlue); sb.Draw(Assets.TransparentBox, m_Rect, Color.SteelBlue); // Draw text Happiness.ShadowString(sb, Assets.DialogFont, m_szTitle, m_vTitlePosition, Color.Goldenrod); Happiness.ShadowString(sb, Assets.HelpFont, m_szSecondaryText, m_vSecondaryPosition, Color.LightGray); // Draw input field m_Input.Draw(sb); // Draw buttons foreach (UIButton b in m_Buttons) { b.Draw(sb); } }
public void Draw(SpriteBatch sb, SpriteFont font, Vector2 position, Color color) { Vector2 fontSize = font.MeasureString("qQ"); int iconSize = (int)fontSize.Y; float fX = position.X; float fY = position.Y; foreach (PieceInfo piece in m_Pieces) { if (piece.m_Str != null) { Happiness.ShadowString(sb, font, piece.m_Str, new Vector2(fX, fY), color); fX += font.MeasureString(piece.m_Str).X; } if (piece.m_Icon != null) { sb.Draw(piece.m_Icon, new Rectangle((int)fX, (int)fY, iconSize, iconSize), Color.White); fX += iconSize; } } }
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); } }