Esempio n. 1
0
        public override bool Draw(UltimaBatcher2D batcher, int x, int y)
        {
            if (!base.Draw(batcher, x, y))
            {
                return(false);
            }

            ResetHueVector();

            if (_ping < 100)
            {
                _hueVector.X = 0x44; // green
            }
            else if (_ping < 150)
            {
                _hueVector.X = 0x34; // yellow
            }
            else if (_ping < 200)
            {
                _hueVector.X = 0x31; // orange
            }
            else
            {
                _hueVector.X = 0x20; // red
            }
            _hueVector.Y = 1;

            batcher.DrawString(Fonts.Bold, _sb.ToString(), x + 10, y + 10, ref _hueVector);

            return(true);
        }
Esempio n. 2
0
        public override bool Draw(UltimaBatcher2D batcher, int x, int y)
        {
            base.Draw(batcher, x, y);

            Vector3 hueVector = ShaderHueTranslator.GetHueVector(0);

            batcher.DrawString(Fonts.Bold, CREDITS, x + _offset.X, y + _offset.Y, hueVector);

            return(true);
        }
Esempio n. 3
0
        public override bool Draw(UltimaBatcher2D batcher, int x, int y)
        {
            base.Draw(batcher, x, y);

            ResetHueVector();

            batcher.DrawString(Fonts.Bold, CREDITS, x + _offset.X, y + _offset.Y, ref HueVector);

            return(true);
        }
Esempio n. 4
0
        public override bool Draw(UltimaBatcher2D batcher, int x, int y)
        {
            if (!base.Draw(batcher, x, y))
            {
                return(false);
            }

            ResetHueVector();
            batcher.DrawString(Fonts.Bold, _sb.ToString(), x + 10, y + 10, ref _hueVector);

            return(true);
        }
Esempio n. 5
0
            public override bool Draw(UltimaBatcher2D batcher, int x, int y)
            {
                base.Draw(batcher, x, y);

                string text = _amount.ToString();

                if (_amount >= 1000)
                {
                    if (text.Length > 4)
                    {
                        if (text.Length > 5) // >= 100.000
                        {
                            text = $"{text.Substring(0, 3)}K+";
                        }
                        else // <= 10.000
                        {
                            text = $"{text.Substring(0, 2)}K+";
                        }
                    }
                    else // 1.000
                    {
                        text = $"{text[0]}K+";
                    }
                }

                Texture2D color = Textures.GetTexture(Color.Gray);

                if (Engine.Profile.Current.CounterBarHighlightOnAmount &&
                    _amount < Engine.Profile.Current.CounterBarHighlightAmount && _graphic != 0)
                {
                    color = Textures.GetTexture(Color.Red);
                }

                Vector3 hue = Vector3.Zero;

                batcher.DrawRectangle(color, x, y, Width, Height, ref hue);

                if (_graphic != 0)
                {
                    hue.X = 59;
                    hue.Y = 1;
                    hue.Z = 0;

                    batcher.DrawString(Fonts.Bold, text, x + 2, y + Height - 15, ref hue);
                }


                return(true);
            }
Esempio n. 6
0
        public override bool Draw(UltimaBatcher2D batcher, int x, int y)
        {
            if (!base.Draw(batcher, x, y))
            {
                return(false);
            }

            Vector3 hueVector = ShaderHueTranslator.GetHueVector(0);

            batcher.DrawString
            (
                Fonts.Bold,
                _cacheText,
                x + 10,
                y + 10,
                hueVector
            );

            return(true);
        }
Esempio n. 7
0
        public override bool Draw(UltimaBatcher2D batcher, int x, int y)
        {
            if (!base.Draw(batcher, x, y))
            {
                return(false);
            }

            Vector3 hueVector = ShaderHueTranslator.GetHueVector(0);

            if (_ping < 150)
            {
                hueVector.X = 0x44; // green
            }
            else if (_ping < 200)
            {
                hueVector.X = 0x34; // yellow
            }
            else if (_ping < 300)
            {
                hueVector.X = 0x31; // orange
            }
            else
            {
                hueVector.X = 0x20; // red
            }

            hueVector.Y = 1;

            batcher.DrawString
            (
                Fonts.Bold,
                _cacheText,
                x + 10,
                y + 10,
                hueVector
            );

            return(true);
        }