Ejemplo n.º 1
0
        public override void Draw(Equestribatch sb)
        {
            if (!entryComplete)
            {
                _displayColor = Color.Multiply(Color.White, timer / ENTRYTIME);
            }
            if (delayComplete && !exitComplete)
            {
                _displayColor = Color.Multiply(Color.White, 1 - (timer / EXITTIME));
            }
            sb.Begin();

            if (entryComplete && !displayComplete)
            {
                sb.DrawString(_fontDisplay, (goldRecieved >= 0 ? "+" : "") + goldRecieved,
                              Vector2.Lerp(_displayPos, _displayPos - new Vector2(0, 128), timer / DISPLAYTIME),
                              Color.Multiply(goldRecieved >= 0 ? Color.Yellow : Color.Red, 1 - (timer / DISPLAYTIME)));
            }

            //sb.DrawString(_fontDisplay, "" + goldDisplayed, _displayPos + Vector2.One, );
            sb.DrawString(_fontDisplay, "" + goldDisplayed, _displayPos, _displayColor);
            sb.Draw(_bits.Texture, _displayPos - new Vector2(38, -8), _displayColor);

            sb.End();

            base.Draw(sb);
        }
Ejemplo n.º 2
0
 private void GenerateWidget(Equestribatch sb)
 {
     sb.Draw(_windowTexture.Texture, new Rectangle((int)0, (int)0, WIDGET_WIDTH, WIDGET_HEIGHT), Border_Color);
     sb.Draw(_windowTexture.Texture, new Rectangle((int)1, (int)1, WIDGET_WIDTH - 2, WIDGET_HEIGHT - 2), Mid_Color);
     sb.Draw(_achievementTexture.Texture, new Rectangle((int)4, (int)4, 96, 96), AchievementSourceRect, Color.White);
     sb.DrawString(_displayFont, _displayFont.WrapText(_achievement.ToString(), WIDGET_WIDTH - 94), new Vector2(100, 4), Color.Magenta);
 }
 private void DrawNameBox(Equestribatch sb)
 {
     int width = (int)_messageBoxFont.Measure(name).X;
     sb.Draw(_nameBoxWindowTexture.Texture, Vector2.Zero,
         new Rectangle(0, 0, 25, _nameBoxWindowTexture.Height),
         EngineGlobals.Settings.SkinColor);
     sb.Draw(_nameBoxWindowTexture.Texture,
         new Rectangle(25, 0, width, _nameBoxWindowTexture.Height),
         new Rectangle(26, 0, 1, _nameBoxWindowTexture.Height),
         EngineGlobals.Settings.SkinColor);
     sb.Draw(_nameBoxWindowTexture.Texture, new Vector2(25 + width, 0),
         new Rectangle(_nameBoxWindowTexture.Width - 25, 0, 25, _nameBoxWindowTexture.Height),
         EngineGlobals.Settings.SkinColor);
     sb.DrawString(_messageBoxFont, name, new Vector2(26, 13), Color.Black);
     sb.DrawString(_messageBoxFont, name, new Vector2(25, 12), Color.White);
 }
Ejemplo n.º 4
0
        public override void Draw(Equestribatch sb)
        {
            if (!entryComplete)
                _displayColor = Color.Multiply(Color.White, timer / ENTRYTIME);
            if (delayComplete && !exitComplete)
                _displayColor = Color.Multiply(Color.White, 1 - (timer / EXITTIME));
            sb.Begin();

            if(entryComplete && !displayComplete)
                sb.DrawString(_fontDisplay,(goldRecieved >= 0 ? "+" : "") + goldRecieved,
                    Vector2.Lerp(_displayPos,_displayPos - new Vector2(0,128),timer / DISPLAYTIME),
                    Color.Multiply(goldRecieved >= 0 ? Color.Yellow : Color.Red,1 - (timer/DISPLAYTIME)));

            //sb.DrawString(_fontDisplay, "" + goldDisplayed, _displayPos + Vector2.One, );
            sb.DrawString(_fontDisplay, "" + goldDisplayed, _displayPos, _displayColor);
            sb.Draw(_bits.Texture, _displayPos - new Vector2(38, -8), _displayColor);

            sb.End();

            base.Draw(sb);
        }
 private void GenerateWidget(Equestribatch sb)
 {
     sb.Draw(_windowTexture.Texture, new Rectangle((int)0, (int)0, WIDGET_WIDTH, WIDGET_HEIGHT), Border_Color);
     sb.Draw(_windowTexture.Texture, new Rectangle((int)1, (int)1, WIDGET_WIDTH - 2, WIDGET_HEIGHT - 2), Mid_Color);
     sb.Draw(_achievementTexture.Texture, new Rectangle((int)4, (int)4, 96, 96), AchievementSourceRect, Color.White);
     sb.DrawString(_displayFont, _displayFont.WrapText(_achievement.ToString(),WIDGET_WIDTH - 94), new Vector2(100, 4), Color.Magenta);
 }
 private void DrawNameBox(Equestribatch sb)
 {
     int width = (int)_messageBoxFont.Measure(name).X;
     sb.Draw(_nameBoxWindowTexture.Texture, Vector2.Zero,
         new Rectangle(0, 0, 25, _nameBoxWindowTexture.Height),
         EquestriEngine.Settings.SkinColor);
     sb.Draw(_nameBoxWindowTexture.Texture,
         new Rectangle(25, 0, width, _nameBoxWindowTexture.Height),
         new Rectangle(26, 0, 1, _nameBoxWindowTexture.Height),
         EquestriEngine.Settings.SkinColor);
     sb.Draw(_nameBoxWindowTexture.Texture, new Vector2(25 + width, 0),
         new Rectangle(_nameBoxWindowTexture.Width - 25, 0, 25, _nameBoxWindowTexture.Height),
         EquestriEngine.Settings.SkinColor);
     sb.DrawString(_messageBoxFont, name, new Vector2(26,13), Color.Black);
     sb.DrawString(_messageBoxFont, name, new Vector2(25,12), Color.White);
 }
 private void RenderText(Equestribatch sb)
 {
     sb.DrawString(_font, _entries, new Vector2(5, 5), /*Color.Multiply(Color.White, showAmount)*/ Color.Black);
     sb.DrawString(_font, _entries, new Vector2(4, 4), /*Color.Multiply(Color.White, showAmount)*/ Color.White);
 }
 private void RenderText(Equestribatch sb)
 {
     sb.DrawString(_font, _entries, new Vector2(5, 5), /*Color.Multiply(Color.White, showAmount)*/ Color.Black);
     sb.DrawString(_font, _entries, new Vector2(4, 4), /*Color.Multiply(Color.White, showAmount)*/ Color.White);
 }