Exemplo n.º 1
0
 public PreloadAlertSettings()
 {
     Enable = true;
     TextSize = new RangeNode<int>(20, 10, 50);
     BackgroundColor = new ColorBGRA(0, 0, 0, 180);
     DefaultTextColor = CorruptedAreaColor = Color.White;
 }
Exemplo n.º 2
0
 public DpsMeterSettings()
 {
     Enable = true;
     DpsTextSize = new RangeNode<int>(30, 10, 50);
     PeakDpsTextSize = new RangeNode<int>(13, 10, 50);
     BackgroundColor = new ColorBGRA(0, 0, 0, 160);
 }
Exemplo n.º 3
0
 private static void Drawing_OnDraw(EventArgs args)
 {
     if (Util.MyHero.IsDead) { return; }
     if (Menu.GetCheckBoxValue("Disable")) { return; }
     var target = TargetSelector.Target;
     if (Menu.GetCheckBoxValue("Enemy.Target") && target != null)
     {
         Circle.Draw(Color.Red, 120f, 1, target.Position);
     }
     target = TargetSelector.Ally;
     if (Menu.GetCheckBoxValue("Ally.Target") && target != null)
     {
         Circle.Draw(Color.Blue, 120f, 1, target.Position);
     }
     var color = new ColorBGRA(255, 255, 255, 100);
     if (Menu.GetCheckBoxValue("Q") && SpellSlot.Q.IsReady())
     {
         Circle.Draw(color, SpellManager.Q.Range, Util.MyHero.Position);
     }
     if (Menu.GetCheckBoxValue("W") && SpellSlot.W.IsReady())
     {
         Circle.Draw(color, SpellManager.W.Range, Util.MyHero.Position);
     }
     if (Menu.GetCheckBoxValue("E") && SpellSlot.E.IsReady())
     {
         Circle.Draw(color, SpellManager.E.Range, Util.MyHero.Position);
     }
     if (Menu.GetCheckBoxValue("R") && SpellSlot.R.IsReady())
     {
         Circle.Draw(color, SpellManager.R.Range, Util.MyHero.Position);
     }
 }
        private Result Clear(IntPtr devicePointer, int count, IntPtr rects, ClearFlags flags, ColorBGRA color, float z, int stencil)
        {
            try
            {
                var structSize = Marshal.SizeOf(typeof(Rectangle));
                var structs = new SharpDX.Rectangle[count];
                for (int i = 0; i < count; i++)
                {
                    structs[i] = (SharpDX.Rectangle)Marshal.PtrToStructure(rects, typeof(SharpDX.Rectangle));
                }

                var rectangles = structs;
                this.Log.LogMethodSignatureTypesAndValues(devicePointer, count, rectangles.PrintTypesNamesValues(), flags,
                                                     color, z, stencil);
                this.GetOrCreateDevice(devicePointer);
                if (rectangles.Length == 0)
                    this.Device.Clear(flags, color, z, stencil);
                else
                    this.Device.Clear(flags, color, z, stencil, rectangles);
            }
            catch (SharpDXException ex)
            {
                Log.Warn(ex);
            }
            catch (Exception ex)
            {
                this.Log.Fatal(ex);
            }

            return Result.Ok;
        }
Exemplo n.º 5
0
        internal static void Initialize()
        {
            var manaBarItem = new MenuItem("DrawManaBarIndicator", "Draw Combo ManaBar Indicator").SetValue(true);
            Program.DrawMenu.AddItem(manaBarItem);

            DxLine = new Line(DxDevice) { Width = 4 };

            Drawing.OnPreReset += DrawingOnOnPreReset;
            Drawing.OnPostReset += DrawingOnOnPostReset;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload;
            AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnDomainUnload;

            Drawing.OnEndScene += eventArgs =>
                {
                    var color = new ColorBGRA(255, 255, 255, 255);

                    var qMana = new[] { 0, 40, 50, 60, 70, 80 };
                    var wMana = new[] { 0, 60, 70, 80, 90, 100 }; // W Mana Cost doesnt works :/
                    var eMana = new[] { 0, 50, 50, 50, 50, 50 };
                    var rMana = new[] { 0, 100, 100, 100 };

                    if (manaBarItem.GetValue<bool>())
                    {
                        var totalCostMana = qMana[Program.Q.Level] + wMana[Program.W.Level] + eMana[Program.E.Level]
                                            + rMana[Program.R.Level];
                        DrawManaPercent(
                            totalCostMana,
                            totalCostMana > ObjectManager.Player.Mana ? new ColorBGRA(255, 0, 0, 255) : new ColorBGRA(255, 255, 255, 255));
                    }

                };
        }
Exemplo n.º 6
0
 /// <summary>
 ///     Initializes static members of the <see cref="MenuSettings" /> class.
 ///     Default Settings Static Constructor.
 /// </summary>
 static MenuSettings()
 {
     ContainerHeight = 30;
     ContainerSelectedColor = new ColorBGRA(255, 255, 255, 255 / 2);
     ContainerSeparatorColor = new ColorBGRA(255, 255, 255, 100);
     Position = new Vector2(30, 30);
     ContainerWidth = 200f;
     Font = new Font(
         Drawing.Direct3DDevice, 
         14, 
         0, 
         FontWeight.DoNotCare, 
         0, 
         false, 
         FontCharacterSet.Default,
         FontPrecision.TrueType,
         FontQuality.ClearTypeNatural,
         FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern, 
         "Tahoma");
     ContainerTextMarkOffset = 8f;
     ContainerTextOffset = 15f;
     HoverColor = new ColorBGRA(255, 255, 255, 50);
     RootContainerColor = new ColorBGRA(0, 0, 0, (byte)(255 / 1.5f));
     TextColor = Color.White;
 }
Exemplo n.º 7
0
        static AutoWalker()
        {
            GameID = DateTime.Now.Ticks + ""+RandomString(10);
            newPF = MainMenu.GetMenu("AB").Get<CheckBox>("newPF").CurrentValue;
            NavGraph=new NavGraph(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "EloBuddy\\AutoBuddyPlus"));
            PfNodes=new List<Vector3>();
            color = new ColorBGRA(79, 219, 50, 255);
            MyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsAlly);
            EneMyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsEnemy);
            EnemyLazer =
                ObjectManager.Get<Obj_AI_Turret>().FirstOrDefault(tur => !tur.IsAlly && tur.GetLane() == Lane.Spawn);
            myHero = ObjectManager.Player;
            initSummonerSpells();

            Target = ObjectManager.Player.Position;
            Orbwalker.DisableMovement = false;

            Orbwalker.DisableAttacking = false;
            Game.OnUpdate += Game_OnUpdate;
            Orbwalker.OverrideOrbwalkPosition = () => Target;
            if (Orbwalker.HoldRadius > 130 || Orbwalker.HoldRadius < 80)
            {
                Chat.Print("=================WARNING=================", Color.Red);
                Chat.Print("Your hold radius value in orbwalker isn't optimal for AutoBuddy", Color.Aqua);
                Chat.Print("Please set hold radius through menu=>Orbwalker");
                Chat.Print("Recommended values: Hold radius: 80-130, Delay between movements: 100-250");
            }
            
            Drawing.OnDraw += Drawing_OnDraw;
            
            Core.DelayAction(OnEndGame, 20000);
            updateItems();
            oldOrbwalk();
            Game.OnTick += OnTick;
        }
Exemplo n.º 8
0
        public static void DrawDmg(float dmg, ColorBGRA color)
        {
            Vector2 hpPosNow = GetHpPosAfterDmg(0);
            Vector2 hpPosAfter = GetHpPosAfterDmg(dmg);

            FullHPBar(hpPosNow, hpPosAfter, color);
        }
Exemplo n.º 9
0
        public void DrawDmg(float dmg, ColorBGRA color)
        {
            var hpPosNow = GetHpPosAfterDmg(0);
            var hpPosAfter = GetHpPosAfterDmg(dmg);

            FillHpBar(hpPosNow, hpPosAfter, color);
        }
Exemplo n.º 10
0
 public WeaponDpsSettings()
 {
     Enable = true;
     FontColor = new ColorBGRA(254, 192, 118, 255);
     DamageFontSize = new RangeNode<int>(20, 10, 50);
     FontSize = new RangeNode<int>(13, 10, 50);
 }
Exemplo n.º 11
0
 public Circle(CheckBox checkBox, ColorBGRA color, Func<float> range, Func<bool> condition, Func<GameObject> source)
 {
     CheckBox = checkBox;
     Range = range;
     Color = color;
     Condition = condition;
     SourceObject = source;
 }
Exemplo n.º 12
0
        public void DrawDmg(float dmg, ColorBGRA color)
        {
            var hpPosNow = GetHpPosAfterDmg(0);
            var hpPosAfter = GetHpPosAfterDmg(dmg);

            FillHpBar(hpPosNow, hpPosAfter, color);
            //fillHPBar((int)(hpPosNow.X - startPosition.X), (int)(hpPosAfter.X- startPosition.X), color);
        }
Exemplo n.º 13
0
        public void drawDmg(float dmg, ColorBGRA color)
        {
            Vector2 hpPosNow = getHpPosAfterDmg(0);
            Vector2 hpPosAfter = getHpPosAfterDmg(dmg);

            fillHPBar(hpPosNow, hpPosAfter, color);
            //fillHPBar((int)(hpPosNow.X - startPosition.X), (int)(hpPosAfter.X- startPosition.X), color);
        }
Exemplo n.º 14
0
        public PreloadAlertSettings()
        {
            Enable = true;
            Masters = true;
            Exiles = true;
            Strongboxes = true;
            CorruptedTitle = true;
            FontSize = new RangeNode<int>(16, 10, 20);
            BackgroundColor = new ColorBGRA(255, 255, 255, 220);
            DefaultFontColor = new ColorBGRA(220, 190, 130, 255);
            AreaFontColor = new ColorBGRA(150, 200, 250, 255);
            HasCorruptedArea = new ColorBGRA(208, 31, 144, 255);
            DarkShrineArea = new ColorBGRA(230, 0, 0, 255);

            MasterZana = new ColorBGRA(255, 0, 255, 255);
            MasterCatarina = new ColorBGRA(100, 255, 255, 255);
            MasterTora = new ColorBGRA(100, 255, 255, 255);
            MasterVorici = new ColorBGRA(100, 255, 255, 255);
            MasterHaku = new ColorBGRA(100, 255, 255, 255);
            MasterElreon = new ColorBGRA(100, 255, 255, 255);
            MasterVagan = new ColorBGRA(100, 255, 255, 255);
            MasterKrillson = new ColorBGRA(255, 0, 255, 255);

            ArcanistStrongbox = new ColorBGRA(255, 0, 255, 255);
            ArtisanStrongbox = new ColorBGRA(210, 210, 210, 255);
            CartographerStrongbox = new ColorBGRA(255, 0, 255, 255);
            GemcutterStrongbox = new ColorBGRA(27, 162, 155, 255);
            JewellerStrongbox = new ColorBGRA(210, 210, 210, 255);
            BlacksmithStrongbox = new ColorBGRA(210, 210, 210, 255);
            ArmourerStrongbox = new ColorBGRA(210, 210, 210, 255);
            OrnateStrongbox = new ColorBGRA(210, 210, 210, 255);
            LargeStrongbox = new ColorBGRA(210, 210, 210, 255);
            PerandusStrongbox = new ColorBGRA(175, 96, 37, 255);
            KaomStrongbox = new ColorBGRA(175, 96, 37, 255);
            MalachaiStrongbox = new ColorBGRA(175, 96, 37, 255);
            EpicStrongbox = new ColorBGRA(175, 96, 37, 255);
            SimpleStrongbox = new ColorBGRA(210, 210, 210, 255);

            OrraGreengate = new ColorBGRA(254, 192, 118, 255);
            ThenaMoga = new ColorBGRA(254, 192, 118, 255);
            AntalieNapora = new ColorBGRA(254, 192, 118, 255);
            TorrOlgosso = new ColorBGRA(254, 192, 118, 255);
            ArmiosBell = new ColorBGRA(254, 192, 118, 255);
            ZacharieDesmarais = new ColorBGRA(254, 192, 118, 255);
            MinaraAnenima = new ColorBGRA(254, 192, 118, 255);
            IgnaPhoenix = new ColorBGRA(254, 192, 118, 255);
            JonahUnchained = new ColorBGRA(254, 192, 118, 255);
            DamoiTui = new ColorBGRA(254, 192, 118, 255);
            XandroBlooddrinker = new ColorBGRA(254, 192, 118, 255);
            VickasGiantbone = new ColorBGRA(254, 192, 118, 255);
            EoinGreyfur = new ColorBGRA(254, 192, 118, 255);
            TinevinHighdove = new ColorBGRA(254, 192, 118, 255);
            MagnusStonethorn = new ColorBGRA(254, 192, 118, 255);
            IonDarkshroud = new ColorBGRA(254, 192, 118, 255);
            AshLessard = new ColorBGRA(254, 192, 118, 255);
            WilorinDemontamer = new ColorBGRA(254, 192, 118, 255);
            AugustinaSolaria = new ColorBGRA(254, 192, 118, 255);
        }
Exemplo n.º 15
0
        static Events()
        {
            var QColor = new ColorBGRA(Color.GreenYellow.ToVector3(), 0.1f);
            QCircle = new Circle(QColor, 500.0f, 3F, true);

            Gapcloser.OnGapcloser += GapcloserOnOnGapcloser;
            Spellbook.OnCastSpell += OnRecall;
            Drawing.OnDraw += OnDraw;
        }
Exemplo n.º 16
0
 public DpsMeterSettings()
 {
     Enable = false;
     DpsTextSize = new RangeNode<int>(16, 10, 20);
     PeakDpsTextSize = new RangeNode<int>(16, 10, 20);
     DpsFontColor = new ColorBGRA(254, 192, 118, 255);
     PeakFontColor = new ColorBGRA(254, 192, 118, 255);
     BackgroundColor = new ColorBGRA(255, 255, 255, 255);
 }
Exemplo n.º 17
0
 public KillCounterSettings()
 {
     Enable = false;
     ShowDetail = true;
     FontColor = new ColorBGRA(254, 192, 118, 255);
     BackgroundColor = new ColorBGRA(255, 255, 255, 255);
     LabelFontSize = new RangeNode<int>(16, 10, 20);
     KillsFontSize = new RangeNode<int>(16, 10, 20);
 }
Exemplo n.º 18
0
        /// <summary>	
        /// Loads a volume from memory.	
        /// </summary>	
        /// <param name="destPaletteRef"><para>Pointer to a  <see cref="SharpDX.Direct3D9.PaletteEntry"/> structure, the destination palette of 256 colors or <c>null</c>.</para></param>	
        /// <param name="destBox"><para>Pointer to a <see cref="SharpDX.Direct3D9.Box"/> structure. Specifies the destination box. Set this parameter to <c>null</c> to specify the entire volume.</para></param>	
        /// <param name="srcMemoryPointer"><para>Pointer to the top-left corner of the source volume in memory.</para></param>	
        /// <param name="srcFormat"><para>Member of the <see cref="SharpDX.Direct3D9.Format"/> enumerated type, the pixel format of the source volume.</para></param>	
        /// <param name="srcRowPitch"><para>Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one row of cells, in bytes.</para></param>	
        /// <param name="srcSlicePitch"><para>Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one slice of cells, in bytes.</para></param>	
        /// <param name="srcPaletteRef"><para>Pointer to a <see cref="SharpDX.Direct3D9.PaletteEntry"/> structure, the source palette of 256 colors or <c>null</c>.</para></param>	
        /// <param name="srcBox"><para>Pointer to a <see cref="SharpDX.Direct3D9.Box"/> structure. Specifies the source box. <c>null</c> is not a valid value for this parameter.</para></param>	
        /// <param name="filter"><para>A combination of one or more <see cref="SharpDX.Direct3D9.Filter"/> controlling how the image is filtered. Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying <see cref="SharpDX.Direct3D9.Filter.Triangle"/> | <see cref="SharpDX.Direct3D9.Filter.Dither"/>.</para></param>	
        /// <param name="colorKey"><para> <see cref="SharpDX.Color4"/> value to replace with transparent black, or 0 to disable the colorkey. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque color keys. Thus, for opaque black, the value would be equal to 0xFF000000.</para></param>	
        /// <returns>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, D3DXERR_INVALIDDATA.</returns>	
        /// <remarks>	
        /// Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If <see cref="SharpDX.Direct3D9.D3DX9.LoadVolumeFromMemory"/> is called and the texture was not already dirty (this is unlikely under normal usage scenarios), the application needs to explicitly call <see cref="SharpDX.Direct3D9.VolumeTexture.AddDirtyBox"/> on the volume texture.	
        /// </remarks>	
        /// <unmanaged>HRESULT D3DXLoadVolumeFromMemory([In] IDirect3DVolume9* pDestVolume,[Out, Buffer] const PALETTEENTRY* pDestPalette,[In] const void* pDestBox,[In] const void* pSrcMemory,[In] D3DFORMAT SrcFormat,[In] unsigned int SrcRowPitch,[In] unsigned int SrcSlicePitch,[In, Buffer] const PALETTEENTRY* pSrcPalette,[In] const void* pSrcBox,[In] D3DX_FILTER Filter,[In] int ColorKey)</unmanaged>	
        public unsafe void LoadFromMemory(SharpDX.Direct3D9.PaletteEntry[] destPaletteRef, Box? destBox, System.IntPtr srcMemoryPointer, SharpDX.Direct3D9.Format srcFormat, int srcRowPitch, int srcSlicePitch, SharpDX.Direct3D9.PaletteEntry[] srcPaletteRef, Box srcBox, SharpDX.Direct3D9.Filter filter, ColorBGRA colorKey)
        {
            Box localDestBox;
            if (destBox.HasValue)
                localDestBox = destBox.Value;

            D3DX9.LoadVolumeFromMemory(
                this, destPaletteRef, new IntPtr(&localDestBox), srcMemoryPointer, srcFormat, srcRowPitch, srcSlicePitch, srcPaletteRef, new IntPtr(&srcBox), filter, colorKey.ToBgra());
        }
Exemplo n.º 19
0
 public Rectangle_Ex(int x, int y, int width, int height, ColorBGRA color, float border = 2)
 {
     X = x;
         Y = y;
         Width = width;
         Height = height;
         Color = color;
         this.border = border;
         _line = new SharpDX.Direct3D9.Line(Drawing.Direct3DDevice) { Width = border};
         Game.OnUpdate += Game_OnUpdate;
 }
Exemplo n.º 20
0
 public static void DrawBox(float x, float y, float w, float h, float px, ColorBGRA Color)
 {
     DrawLine(x, y, x + w, y, 1, new ColorBGRA(0,0,0, 255));
     DrawLine(x, y, x, y + h, 1, new ColorBGRA(0, 0, 0, 255));
     DrawLine(x, y + h, x + w, y + h, 1, new ColorBGRA(0, 0, 0, 255));
     DrawLine(x + w, y, x + w, y + h, 1, new ColorBGRA(0, 0, 0, 255));
     DrawFilledBox(x, y + h, w, px, Color);
     DrawFilledBox(x - px, y, px, h, Color);
     DrawFilledBox(x, y - px, w, px, Color);
     DrawFilledBox(x + w, y, px, h, Color);
     DrawFilledBox(x, y, w, h, Color);
 }
Exemplo n.º 21
0
        private static void FullHPBar(Vector2 from, Vector2 to, ColorBGRA color)
        {
            DxLine.Begin();

            DxLine.Draw(new[]
            {
                new Vector2((int) from.X, (int) from.Y + 4f),
                new Vector2((int) to.X, (int) to.Y + 4f)
            }, color);

            DxLine.End();
        }
Exemplo n.º 22
0
 public static void DrawLine(Line line, Vector3 from, Vector3 to, ColorBGRA color, Size size = default(Size), float[] scale = null, float rotation = 0.0f)
 {
     if (line != null)
     {
         from = from.SwitchYZ();
         to = to.SwitchYZ();
         Matrix nMatrix = (scale != null ? Matrix.Scaling(scale[0], scale[1], 0) : Matrix.Scaling(1)) *
                          Matrix.RotationZ(rotation) * Matrix.Translation(from);
         Vector3[] vec = { from, to };
         line.DrawTransform(vec, nMatrix, color);
     }
 }
Exemplo n.º 23
0
 public MonsterTrackerSettings()
 {
     Enable = true;
     Monsters = true;
     Minions = true;
     PlaySound = true;
     ShowText = true;
     TextSize = new RangeNode<int>(27, 10, 50);
     BackgroundColor = new ColorBGRA(0, 0, 0, 128);
     TextPositionX = new RangeNode<int>(50, 0, 100);
     TextPositionY = new RangeNode<int>(15, 0, 100);
 }
Exemplo n.º 24
0
        public static void DrawLine(float x1, float y1, float x2, float y2, float w, ColorBGRA Color)
        {
            Vector2[] vLine = new Vector2[2] { new Vector2(x1, y1), new Vector2(x2, y2) };

            line.GLLines = true;
            line.Antialias = true;
            line.Width = w;

            line.Begin();
            line.Draw(vLine, Color);
            line.End();
        }
 public MonsterTrackerSettings()
 {
     Enable = true;
     Monsters = true;
     Minions = true;
     PlaySound = true;
     ShowText = true;
     TextSize = new RangeNode<int>(20, 10, 50);
     BackgroundColor = new ColorBGRA(255, 255, 255, 255);
     TextPositionX = new RangeNode<int>(50, 0, 100);
     TextPositionY = new RangeNode<int>(85, 0, 100);
     DefaultTextColor = Color.Red;
 }
Exemplo n.º 26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Alerter"/> class.
        /// </summary>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="text">The text.</param>
        /// <param name="size">The size.</param>
        /// <param name="color">The color.</param>
        /// <param name="faceName">Name of the face.</param>
        /// <param name="duration">The duration.</param>
        public Alerter(int x,
            int y,
            string text,
            int size,
            ColorBGRA color,
            string faceName = "Calibri",
            float duration = 1f) : base(x, y, text, size, color, faceName)
        {
            _duration = duration;
            _startTime = Utils.TickCount;
            _endTime = _startTime + _duration;

            Game.OnUpdate += Game_OnGameUpdate;
        }
        /// <summary>
        ///     Initializes static members of the <see cref="TechMenuSettings" /> class.
        ///     Default Settings Static Constructor.
        /// </summary>
        static TechMenuSettings()
        {
            RootContainerColor = new ColorBGRA(9, 17, 19, 255);
            ContainerSelectedColor = new ColorBGRA(11, 32, 33, 255);

            Font = new Font(
                Drawing.Direct3DDevice,
                14,
                0,
                FontWeight.DoNotCare,
                0,
                false,
                FontCharacterSet.Default,
                FontPrecision.TrueType,
                FontQuality.ClearTypeNatural,
                FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern,
                "Arial Rounded MT Bold");

            FontCaption = new Font(
                Drawing.Direct3DDevice,
                14,
                0,
                FontWeight.DoNotCare,
                0,
                false,
                FontCharacterSet.Default,
                FontPrecision.TrueType,
                FontQuality.ClearTypeNatural,
                FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern,
                "Arial Rounded MT Bold");

            FontMenuSymbol = new Font(
                Drawing.Direct3DDevice,
                20,
                0,
                FontWeight.DoNotCare,
                0,
                false,
                FontCharacterSet.Default,
                FontPrecision.TrueType,
                FontQuality.ClearTypeNatural,
                FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative | FontPitchAndFamily.Modern,
                "Arial Rounded MT Bold");

            TextColor = new ColorBGRA(43, 250, 240, 255);
            TextCaptionColor = new ColorBGRA(41, 221, 218, 255);
            KeyBindColor = new ColorBGRA(67, 159, 255, 255);
            SliderColor = new ColorBGRA(163, 202, 241, 255);
        }
Exemplo n.º 28
0
        public XpRateSettings()
        {
            Enable = true;
            OnlyAreaName = false;
            ShowLatency = true;
            FontSize = new RangeNode<int>(16, 10, 20);
            BackgroundColor = new ColorBGRA(255, 255, 255, 255);

            AreaFontColor = new ColorBGRA(140, 200, 255, 255);
            XphFontColor = new ColorBGRA(254, 192, 118, 255);
            TimeLeftColor = new ColorBGRA(254, 192, 118, 255);
            FpsFontColor = new ColorBGRA(254, 192, 118, 255);
            TimerFontColor = new ColorBGRA(254, 192, 118, 255);
            LatencyFontColor = new ColorBGRA(254, 192, 118, 255);
        }
Exemplo n.º 29
0
 public Push(LogicSelector current)
 {
     color=new ColorBGRA(255, 210, 105, 255);
     colorRed = new ColorBGRA(139, 0, 0, 255);
     colorGreen = new ColorBGRA(0, 100, 0, 255);
     SetRandVector();
     randomVector = new Vector3();
     currentWave = new Obj_AI_Minion[0];
     currentLogic = current;
     Core.DelayAction(SetWaveNumber, 500);
     SetCurrentWave();
     SetOffset();
     if (MainMenu.GetMenu("AB").Get<CheckBox>("debuginfo").CurrentValue)
         Drawing.OnDraw += Drawing_OnDraw;
 }
Exemplo n.º 30
0
        public Push(LogicSelector current)
        {
            color=new ColorBGRA(255, 210, 105, 255);
            colorRed = new ColorBGRA(139, 0, 0, 255);
            colorGreen = new ColorBGRA(0, 100, 0, 255);
            SetRandVector();
            randomVector = new Vector3();
            currentWave = new Obj_AI_Minion[0];
            currentLogic = current;
            Core.DelayAction(SetWaveNumber, 500);
            SetCurrentWave();
            SetOffset();

            Drawing.OnDraw += Drawing_OnDraw;
        }
Exemplo n.º 31
0
 public TexturedVertex(float x, float y, float u, float v, ColorBGRA diffuse)
 {
     position     = new Vector2(x, y);
     textureUV    = new Vector2(u, v);
     this.diffuse = diffuse;
 }
Exemplo n.º 32
0
 public static void DrawFont(Font vFont, string vText, float jx, float jy, ColorBGRA jc)
 {
     vFont.DrawText(null, vText, (int)jx, (int)jy, jc);
 }
Exemplo n.º 33
0
        /// <summary>
        ///     Draw a <see cref="MenuList" />
        /// </summary>
        public override void Draw()
        {
            var dropdownMenuWidth = this.dropDownButtonWidth + (2 * TextSpacing) + this.Component.MaxStringWidth;
            var position          = this.Component.Position;
            var rectangleName     = BlueUtilities.GetContainerRectangle(this.Component)
                                    .GetCenteredText(null, MenuSettings.Font, this.Component.DisplayName, CenteredFlags.VerticalCenter);

            MenuSettings.Font.DrawText(
                MenuManager.Instance.Sprite,
                this.Component.DisplayName,
                (int)(position.X + MenuSettings.ContainerTextOffset),
                (int)rectangleName.Y,
                MenuSettings.TextColor);

            MenuSettings.Font.DrawText(
                MenuManager.Instance.Sprite,
                "\u23EC",
                (int)(position.X + this.Component.MenuWidth - this.dropDownButtonWidth + ArrowSpacing),
                (int)rectangleName.Y,
                MenuSettings.TextColor);

            MenuSettings.Font.DrawText(
                MenuManager.Instance.Sprite,
                this.Component.SelectedValueAsObject.ToString(),
                (int)position.X + this.Component.MenuWidth - this.dropDownButtonWidth - TextSpacing
                - this.Component.MaxStringWidth,
                (int)rectangleName.Y,
                this.Component.Active ? new ColorBGRA(0, 186, 255, 255) : MenuSettings.TextColor);
            Line.Width = 1f;
            Line.Begin();
            Line.Draw(
                new[]
            {
                new Vector2(
                    position.X + this.Component.MenuWidth - this.dropDownButtonWidth - (2 * TextSpacing)
                    - this.Component.MaxStringWidth,
                    position.Y + 5),
                new Vector2(
                    position.X + this.Component.MenuWidth - this.dropDownButtonWidth - (2 * TextSpacing)
                    - this.Component.MaxStringWidth,
                    position.Y + MenuSettings.ContainerHeight - 5)
            },
                MenuSettings.ContainerSeparatorColor);
            Line.End();

            if (this.Component.Active)
            {
                var valueStrings       = this.Component.ValuesAsStrings;
                var dropdownMenuHeight = valueStrings.Length * MenuSettings.ContainerHeight;
                MenuManager.Instance.DrawDelayed(
                    delegate
                {
                    var color         = MenuSettings.RootContainerColor;
                    var dropdownColor = new ColorBGRA(color.R, color.G, color.B, 255);
                    Line.Width        = dropdownMenuWidth;
                    Line.Begin();
                    Line.Draw(
                        new[]
                    {
                        new Vector2(
                            position.X + Component.MenuWidth - (Line.Width / 2),
                            position.Y + MenuSettings.ContainerHeight),
                        new Vector2(
                            position.X + Component.MenuWidth - (Line.Width / 2),
                            position.Y + MenuSettings.ContainerHeight + dropdownMenuHeight)
                    }, dropdownColor);
                    Line.End();

                    var x =
                        (int)
                        (position.X + Component.MenuWidth - dropDownButtonWidth - TextSpacing
                         - Component.MaxStringWidth);
                    var y = (int)rectangleName.Y;
                    for (var i = 0; i < valueStrings.Length; i++)
                    {
                        if (i == Component.HoveringIndex)
                        {
                            Line.Width = MenuSettings.ContainerHeight;
                            Line.Begin();
                            Line.Draw(
                                new[]
                            {
                                new Vector2(
                                    position.X + Component.MenuWidth - dropdownMenuWidth,
                                    position.Y + ((i + 1) * MenuSettings.ContainerHeight)
                                    + MenuSettings.ContainerHeight / 2f),
                                new Vector2(
                                    position.X + Component.MenuWidth,
                                    position.Y + ((i + 1) * MenuSettings.ContainerHeight)
                                    + MenuSettings.ContainerHeight / 2f)
                            },
                                MenuSettings.HoverColor);
                            Line.End();
                        }

                        Line.Width = 1f;
                        Line.Begin();
                        Line.Draw(
                            new[]
                        {
                            new Vector2(
                                position.X + Component.MenuWidth - dropdownMenuWidth + 10,
                                position.Y + (MenuSettings.ContainerHeight * (i + 1))),
                            new Vector2(
                                position.X + Component.MenuWidth - 10,
                                position.Y + (MenuSettings.ContainerHeight * (i + 1)))
                        },
                            MenuSettings.ContainerSeparatorColor);
                        Line.End();
                        y += MenuSettings.ContainerHeight;
                        MenuSettings.Font.DrawText(
                            MenuManager.Instance.Sprite,
                            valueStrings[i],
                            x,
                            y,
                            MenuSettings.TextColor);
                        if (Component.Index == i)
                        {
                            var checkmarkWidth = MenuSettings.Font.MeasureText(null, "\u2713", 0).Width;
                            MenuSettings.Font.DrawText(
                                MenuManager.Instance.Sprite,
                                "\u2713",
                                (int)(position.X + Component.MenuWidth - checkmarkWidth - TextSpacing),
                                y,
                                new ColorBGRA(1, 165, 226, 255));
                        }
                    }

                    Line.Width = 1f;
                    Line.Begin();
                    Line.Draw(
                        new[]
                    {
                        new Vector2(
                            position.X + Component.MenuWidth - dropdownMenuWidth,
                            position.Y + MenuSettings.ContainerHeight),
                        new Vector2(
                            position.X + Component.MenuWidth - dropdownMenuWidth,
                            position.Y + MenuSettings.ContainerHeight * (valueStrings.Length + 1)),
                        new Vector2(
                            position.X + Component.MenuWidth,
                            position.Y + MenuSettings.ContainerHeight * (valueStrings.Length + 1)),
                        new Vector2(
                            position.X + Component.MenuWidth,
                            position.Y + MenuSettings.ContainerHeight)
                    },
                        MenuSettings.ContainerSeparatorColor);
                    Line.End();
                });
            }
        }
Exemplo n.º 34
0
 /// <summary>
 /// Calculates the value
 /// </summary>
 /// <param name="curTime">Current Time (seconds)</param>
 /// <param name="times">Pulsate times</param>
 /// <param name="startVal">Start Value</param>
 /// <param name="dur">Duration of the animation</param>
 /// <returns>Returns the calculated value</returns>
 private ColorBGRA Calculate(double curTime, int times, ColorBGRA startVal, double dur)
 {
     this.endValue = this.Pulsate(curTime, times, startVal, dur);
     return(this.endValue ?? this.startValue);
 }
Exemplo n.º 35
0
 private Color ToColor(ColorBGRA color)
 {
     return(Color.FromArgb(color.A, color.R, color.G, color.B));
 }
Exemplo n.º 36
0
        private static void FinishLoading()
        {
            EloBuddy.Drawing.OnDraw            += Draw;
            Game.OnUpdate                      += OnUpdate;
            Events.OnGapCloser                 += OnGapcloser;
            Events.OnInterruptableTarget       += OnInterruptableTarget;
            DelayAction.Add(3000, () => MyRange = Player.GetRealAutoAttackRange());
            //Variables.Orbwalker.Enabled = true;
            //DelayAction.Add(1000, () => Variables.Orbwalker.Enabled = true);
            //DelayAction.Add(5000, () => Variables.Orbwalker.Enabled = true);
            //DelayAction.Add(10000, () => Variables.Orbwalker.Enabled = true);
            Menu                     = new Menu("tyler1", "Tyler1", true);
            AutoCatch                = Menu.Add(new MenuBool("tyler1auto", "Auto catch axes?", true));
            CatchOnlyCloseToMouse    = Menu.Add(new MenuBool("tyler1onlyclose", "Catch only axes close to mouse?", true));
            MaxDistToMouse           = Menu.Add(new MenuSlider("tyler1maxdist", "Max axe distance to mouse", 500, 250, 1250));
            OnlyCatchIfSafe          = Menu.Add(new MenuBool("tyler1safeaxes", "Only catch axes if safe (anti melee)", false));
            MinQLaneclearManaPercent =
                Menu.Add(new MenuSlider("tyler1QLCMana", "Min Mana Percent for Q Laneclear", 60, 0, 100));
            EMenu           = Menu.Add(new Menu("tyler1E", "E Settings: "));
            ECombo          = EMenu.Add(new MenuBool("tyler1ECombo", "Use E in Combo", true));
            EGC             = EMenu.Add(new MenuBool("tyler1EGC", "Use E on Gapcloser", true));
            EInterrupt      = EMenu.Add(new MenuBool("tyler1EInterrupt", "Use E to Interrupt", true));
            RMenu           = Menu.Add(new Menu("tyler1R", "R Settings:"));
            RKS             = RMenu.Add(new MenuBool("tyler1RKS", "Use R to steal kills", true));
            RKSOnlyIfCantAA = RMenu.Add(new MenuBool("tyler1RKSOnlyIfCantAA", "Use R KS only if can't AA", true));
            RIfHit          = RMenu.Add(new MenuSlider("tyler1RIfHit", "Use R if it will hit X enemies", 2, 1, 5));
            R1vs1           = RMenu.Add(new MenuBool("tyler1R1v1", "Always use R in 1v1", true));

            WCombo   = Menu.Add(new MenuBool("tyler1WCombo", "Use W in Combo", true));
            UseItems = Menu.Add(new MenuBool("tyler1Items", "Use Items?", true));

            DrawingMenu        = Menu.Add(new Menu("tyler1DrawSettings", "Draw Settings:"));
            DrawAXECatchRadius = DrawingMenu.Add(new MenuBool("tyler1AxeCatchDraw", "Draw Axe Catch Radius", true));
            DrawAXELocation    = DrawingMenu.Add(new MenuBool("tyler1AxeLocationDraw", "Draw Axe Location", true));
            DrawAXELine        = DrawingMenu.Add(new MenuBool("tyler1AxeLineDraw", "Draw Line to Axe Position", true));
            ColorMenu          = DrawingMenu.Add(new MenuColor("tyler1DrawingColor", "Drawing Color", ColorBGRA.FromRgba(Color.Red.ToRgba())));

            Menu.Attach();
        }
Exemplo n.º 37
0
        private void OnDrawingEndScene(EventArgs args)
        {
            try
            {
                if (Drawing.Direct3DDevice == null || Drawing.Direct3DDevice.IsDisposed)
                {
                    return;
                }

                if (_line != null && !_line.IsDisposed)
                {
                    var colorEnemy = Menu.Item(Name + "DrawingColorEnemy").GetValue <Color>();
                    var colorAlly  = Menu.Item(Name + "DrawingColorAlly").GetValue <Color>();
                    var alpha      = (byte)(Menu.Item(Name + "DrawingOpacity").GetValue <Slider>().Value * 255 / 100);

                    var width  = Menu.Item(Name + "DrawingWidth").GetValue <Slider>().Value;
                    var height = Menu.Item(Name + "DrawingHeight").GetValue <Slider>().Value;

                    var sColorEnemy  = new ColorBGRA(colorEnemy.R, colorEnemy.G, colorEnemy.B, alpha);
                    var sColorAlly   = new ColorBGRA(colorAlly.R, colorAlly.G, colorAlly.B, alpha);
                    var sColorBorder = new ColorBGRA(255, 255, 255, alpha);

                    var posX = Menu.Item(Name + "DrawingOffsetLeft").GetValue <Slider>().Value;
                    var posY = Menu.Item(Name + "DrawingOffsetTop").GetValue <Slider>().Value;

                    var maxWeight = Menu.Item(Name + "MaxWeight").GetValue <Slider>().Value;

                    var margin    = width / 3f * 0.075f;
                    var barWidth  = (width - margin * 2f) / 3f;
                    var barHeight = height;

                    var offset = 0f;

                    for (var i = 0; i < 3; i++)
                    {
                        var difference = i == 0
                            ? _topChaos - _topOrder
                            : (i == 1 ? _midChaos - _midOrder : _botChaos - _botOrder);
                        var chaosWins = difference > 0;
                        difference = Math.Abs(difference);
                        if (difference > 0)
                        {
                            var pWidth = barWidth / 2f / maxWeight * Math.Min(maxWeight, difference);
                            _line.Width = barHeight;
                            _line.Begin();
                            if (chaosWins)
                            {
                                _line.Draw(
                                    new[]
                                {
                                    new Vector2(posX + offset + barWidth / 2f - pWidth, posY + barHeight / 2f),
                                    new Vector2(posX + offset + barWidth / 2f, posY + barHeight / 2f)
                                },
                                    ObjectManager.Player.Team == GameObjectTeam.Chaos ? sColorAlly : sColorEnemy);
                            }
                            else
                            {
                                _line.Draw(
                                    new[]
                                {
                                    new Vector2(posX + offset + barWidth / 2f, posY + barHeight / 2f),
                                    new Vector2(posX + offset + barWidth / 2f + pWidth, posY + barHeight / 2f)
                                },
                                    ObjectManager.Player.Team == GameObjectTeam.Order ? sColorAlly : sColorEnemy);
                            }
                            _line.End();
                        }

                        _line.Width = 1;
                        _line.Begin();

                        _line.Draw(
                            new[] { new Vector2(posX + offset, posY), new Vector2(posX + offset + barWidth, posY) },
                            sColorBorder);
                        _line.Draw(
                            new[]
                        {
                            new Vector2(posX + offset + barWidth, posY),
                            new Vector2(posX + offset + barWidth, posY + barHeight)
                        }, sColorBorder);
                        _line.Draw(
                            new[]
                        {
                            new Vector2(posX + offset + (barWidth / 2f - 0.5f), posY),
                            new Vector2(posX + offset + (barWidth / 2f - 0.5f), posY + barHeight)
                        }, sColorBorder);
                        _line.Draw(
                            new[]
                        {
                            new Vector2(posX + offset, posY + barHeight),
                            new Vector2(posX + offset + barWidth, posY + barHeight)
                        }, sColorBorder);
                        _line.Draw(
                            new[] { new Vector2(posX + offset, posY), new Vector2(posX + offset, posY + barHeight) },
                            sColorBorder);

                        _line.End();

                        offset += barWidth + margin;
                    }
                }
            }
            catch (Exception ex)
            {
                //Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemplo n.º 38
0
        public PreloadAlertSettings()
        {
            Enable           = true;
            Masters          = true;
            Exiles           = true;
            Strongboxes      = true;
            CorruptedArea    = true;
            CorruptedTitle   = true;
            TextSize         = new RangeNode <int>(16, 10, 50);
            BackgroundColor  = new ColorBGRA(0, 0, 0, 255);
            DefaultTextColor = new ColorBGRA(210, 210, 210, 255);
            AreaTextColor    = new ColorBGRA(150, 200, 250, 255);
            HasCorruptedArea = new ColorBGRA(208, 31, 144, 255);

            CadiroTrader                      = new ColorBGRA(255, 128, 0, 255);
            PerandusChestStandard             = new ColorBGRA(153, 255, 51, 255);
            PerandusChestRarity               = new ColorBGRA(153, 255, 51, 255);
            PerandusChestQuantity             = new ColorBGRA(153, 255, 51, 255);
            PerandusChestCoins                = new ColorBGRA(153, 255, 51, 255);
            PerandusChestJewellery            = new ColorBGRA(153, 255, 51, 255);
            PerandusChestGems                 = new ColorBGRA(153, 255, 51, 255);
            PerandusChestCurrency             = new ColorBGRA(153, 255, 51, 255);
            PerandusChestInventory            = new ColorBGRA(153, 255, 51, 255);
            PerandusChestDivinationCards      = new ColorBGRA(153, 255, 51, 255);
            PerandusChestKeepersOfTheTrove    = new ColorBGRA(153, 255, 51, 255);
            PerandusChestUniqueItem           = new ColorBGRA(153, 255, 51, 255);
            PerandusChestMaps                 = new ColorBGRA(153, 255, 51, 255);
            PerandusChestFishing              = new ColorBGRA(153, 255, 51, 255);
            PerandusManorUniqueChest          = new ColorBGRA(153, 255, 51, 255);
            PerandusManorCurrencyChest        = new ColorBGRA(153, 255, 51, 255);
            PerandusManorMapsChest            = new ColorBGRA(153, 255, 51, 255);
            PerandusManorJewelryChest         = new ColorBGRA(153, 255, 51, 255);
            PerandusManorDivinationCardsChest = new ColorBGRA(153, 255, 51, 255);
            PerandusManorLostTreasureChest    = new ColorBGRA(153, 255, 51, 255);

            MasterZana     = new ColorBGRA(255, 2550, 0, 255);
            MasterCatarina = new ColorBGRA(100, 255, 255, 255);
            MasterTora     = new ColorBGRA(100, 255, 255, 255);
            MasterVorici   = new ColorBGRA(100, 255, 255, 255);
            MasterHaku     = new ColorBGRA(100, 255, 255, 255);
            MasterElreon   = new ColorBGRA(100, 255, 255, 255);
            MasterVagan    = new ColorBGRA(100, 255, 255, 255);
            MasterKrillson = new ColorBGRA(255, 0, 255, 255);

            ArcanistStrongbox     = new ColorBGRA(255, 0, 255, 255);
            ArtisanStrongbox      = new ColorBGRA(210, 210, 210, 255);
            CartographerStrongbox = new ColorBGRA(255, 255, 0, 255);
            GemcutterStrongbox    = new ColorBGRA(27, 162, 155, 255);
            JewellerStrongbox     = new ColorBGRA(210, 210, 210, 255);
            BlacksmithStrongbox   = new ColorBGRA(210, 210, 210, 255);
            ArmourerStrongbox     = new ColorBGRA(210, 210, 210, 255);
            OrnateStrongbox       = new ColorBGRA(210, 210, 210, 255);
            LargeStrongbox        = new ColorBGRA(210, 210, 210, 255);
            PerandusStrongbox     = new ColorBGRA(175, 96, 37, 255);
            KaomStrongbox         = new ColorBGRA(175, 96, 37, 255);
            MalachaiStrongbox     = new ColorBGRA(175, 96, 37, 255);
            EpicStrongbox         = new ColorBGRA(175, 96, 37, 255);
            SimpleStrongbox       = new ColorBGRA(210, 210, 210, 255);

            OrraGreengate      = new ColorBGRA(254, 192, 118, 255);
            ThenaMoga          = new ColorBGRA(254, 192, 118, 255);
            AntalieNapora      = new ColorBGRA(254, 192, 118, 255);
            TorrOlgosso        = new ColorBGRA(254, 192, 118, 255);
            ArmiosBell         = new ColorBGRA(254, 192, 118, 255);
            ZacharieDesmarais  = new ColorBGRA(254, 192, 118, 255);
            MinaraAnenima      = new ColorBGRA(254, 192, 118, 255);
            IgnaPhoenix        = new ColorBGRA(254, 192, 118, 255);
            JonahUnchained     = new ColorBGRA(254, 192, 118, 255);
            DamoiTui           = new ColorBGRA(254, 192, 118, 255);
            XandroBlooddrinker = new ColorBGRA(254, 192, 118, 255);
            VickasGiantbone    = new ColorBGRA(254, 192, 118, 255);
            EoinGreyfur        = new ColorBGRA(254, 192, 118, 255);
            TinevinHighdove    = new ColorBGRA(254, 192, 118, 255);
            MagnusStonethorn   = new ColorBGRA(254, 192, 118, 255);
            IonDarkshroud      = new ColorBGRA(254, 192, 118, 255);
            AshLessard         = new ColorBGRA(254, 192, 118, 255);
            WilorinDemontamer  = new ColorBGRA(254, 192, 118, 255);
            AugustinaSolaria   = new ColorBGRA(254, 192, 118, 255);
            DenaLorenni        = new ColorBGRA(254, 192, 118, 255);
            VanthAgiel         = new ColorBGRA(254, 192, 118, 255);
            LaelFuria          = new ColorBGRA(254, 192, 118, 255);
        }
Exemplo n.º 39
0
 public ItemModsSettings()
 {
     Enable          = false;
     ModTextSize     = new RangeNode <int>(13, 10, 50);
     BackgroundColor = new ColorBGRA(0, 0, 0, 220);
 }
Exemplo n.º 40
0
 /// <summary>
 ///     Circle Constructor
 /// </summary>
 /// <param name="position">Circle Position and Radius</param>
 /// <param name="rotate">Circle Rotation</param>
 /// <param name="type">Circle Type</param>
 /// <param name="smooth">Smooth Circle</param>
 /// <param name="resolution">Circle Resolution</param>
 /// <param name="color">Circle Color</param>
 public Circle(Vector3 position, int rotate, CircleType type, bool smooth, int resolution, ColorBGRA color)
 {
     Base(position.ToVector2(), position.Z, rotate, type, smooth, resolution, color);
 }
Exemplo n.º 41
0
 public static void DrawText(Font vFont, string vText, float vPosX, float vPosY, ColorBGRA vColor,
                             bool shadow = false)
 {
     if (shadow)
     {
         vFont.DrawText(null, vText, (int)vPosX + 2, (int)vPosY + 2, SharpDX.Color.Black);
     }
     vFont.DrawText(null, vText, (int)vPosX, (int)vPosY, vColor);
 }
Exemplo n.º 42
0
        /// <summary>
        ///     Sets the notification border color
        /// </summary>
        /// <param name="color">System Drawing Color</param>
        public Notification SetBorderColor(Color color)
        {
            BorderColor = new ColorBGRA(color.R, color.G, color.B, color.A);

            return(this);
        }
Exemplo n.º 43
0
        public PreloadAlertSettings()
        {
            Enable         = true;
            Masters        = true;
            Exiles         = true;
            Strongboxes    = true;
            PerandusBoxes  = true;
            Essence        = true;
            CorruptedArea  = true;
            CorruptedTitle = true;

            ReloadButton = new HotkeyNode(System.Windows.Forms.Keys.F5);

            TextSize           = new RangeNode <int>(16, 10, 50);
            BackgroundColor    = new ColorBGRA(0, 0, 0, 255);
            DefaultTextColor   = new ColorBGRA(210, 210, 210, 255);
            AreaTextColor      = new ColorBGRA(150, 200, 250, 255);
            CorruptedAreaColor = new ColorBGRA(208, 31, 144, 255);

            RemnantOfCorruption = new ColorBGRA(255, 255, 0, 255);
            EssenceOfAnger      = new ColorBGRA(255, 255, 0, 255);
            EssenceOfHatred     = new ColorBGRA(255, 255, 0, 255);
            EssenceOfWrath      = new ColorBGRA(255, 255, 0, 255);
            EssenceOfMisery     = new ColorBGRA(208, 31, 144, 255);
            EssenceOfTorment    = new ColorBGRA(255, 255, 0, 255);
            EssenceOfFear       = new ColorBGRA(255, 255, 0, 255);
            EssenceOfSuffering  = new ColorBGRA(255, 255, 0, 255);
            EssenceOfEnvy       = new ColorBGRA(208, 31, 144, 255);
            EssenceOfZeal       = new ColorBGRA(255, 255, 0, 255);
            EssenceOfLoathing   = new ColorBGRA(255, 255, 0, 255);
            EssenceOfScorn      = new ColorBGRA(208, 31, 144, 255);
            EssenceOfSorrow     = new ColorBGRA(255, 255, 0, 255);
            EssenceOfContempt   = new ColorBGRA(255, 255, 0, 255);
            EssenceOfRage       = new ColorBGRA(255, 255, 0, 255);
            EssenceOfDread      = new ColorBGRA(208, 31, 144, 255);
            EssenceOfGreed      = new ColorBGRA(208, 31, 144, 255);
            EssenceOfWoe        = new ColorBGRA(208, 31, 144, 255);
            EssenceOfDoubt      = new ColorBGRA(255, 255, 0, 255);
            EssenceOfSpite      = new ColorBGRA(255, 255, 0, 255);
            EssenceOfHysteria   = new ColorBGRA(255, 255, 0, 255);
            EssenceOfInsanity   = new ColorBGRA(255, 255, 0, 255);
            EssenceOfHorror     = new ColorBGRA(255, 255, 0, 255);
            EssenceOfDelirium   = new ColorBGRA(255, 255, 0, 255);
            EssenceOfAnguish    = new ColorBGRA(255, 255, 0, 255);

            CadiroTrader                      = new ColorBGRA(255, 128, 0, 255);
            PerandusChestStandard             = new ColorBGRA(153, 255, 51, 255);
            PerandusChestRarity               = new ColorBGRA(153, 255, 51, 255);
            PerandusChestQuantity             = new ColorBGRA(153, 255, 51, 255);
            PerandusChestCoins                = new ColorBGRA(153, 255, 51, 255);
            PerandusChestJewellery            = new ColorBGRA(153, 255, 51, 255);
            PerandusChestGems                 = new ColorBGRA(153, 255, 51, 255);
            PerandusChestCurrency             = new ColorBGRA(153, 255, 51, 255);
            PerandusChestInventory            = new ColorBGRA(153, 255, 51, 255);
            PerandusChestDivinationCards      = new ColorBGRA(153, 255, 51, 255);
            PerandusChestKeepersOfTheTrove    = new ColorBGRA(153, 255, 51, 255);
            PerandusChestUniqueItem           = new ColorBGRA(153, 255, 51, 255);
            PerandusChestMaps                 = new ColorBGRA(153, 255, 51, 255);
            PerandusChestFishing              = new ColorBGRA(153, 255, 51, 255);
            PerandusManorUniqueChest          = new ColorBGRA(153, 255, 51, 255);
            PerandusManorCurrencyChest        = new ColorBGRA(153, 255, 51, 255);
            PerandusManorMapsChest            = new ColorBGRA(153, 255, 51, 255);
            PerandusManorJewelryChest         = new ColorBGRA(153, 255, 51, 255);
            PerandusManorDivinationCardsChest = new ColorBGRA(153, 255, 51, 255);
            PerandusManorLostTreasureChest    = new ColorBGRA(153, 255, 51, 255);

            MasterZana     = new ColorBGRA(255, 255, 0, 255);
            MasterNiko     = new ColorBGRA(100, 255, 255, 255);
            MasterEinhar   = new ColorBGRA(100, 255, 255, 255);
            MasterAlva     = new ColorBGRA(100, 255, 255, 255);
            MasterJun      = new ColorBGRA(100, 255, 255, 255);
            MasterCatarina = new ColorBGRA(100, 255, 255, 255);
            MasterTora     = new ColorBGRA(100, 255, 255, 255);
            MasterVorici   = new ColorBGRA(100, 255, 255, 255);
            MasterHaku     = new ColorBGRA(100, 255, 255, 255);
            MasterElreon   = new ColorBGRA(100, 255, 255, 255);
            MasterVagan    = new ColorBGRA(100, 255, 255, 255);
            MasterKrillson = new ColorBGRA(255, 0, 255, 255);

            ArcanistStrongbox     = new ColorBGRA(255, 0, 255, 255);
            ArtisanStrongbox      = new ColorBGRA(210, 210, 210, 255);
            CartographerStrongbox = new ColorBGRA(255, 255, 0, 255);
            DivinerStrongbox      = new ColorBGRA(255, 0, 255, 255);
            GemcutterStrongbox    = new ColorBGRA(27, 162, 155, 255);
            JewellerStrongbox     = new ColorBGRA(210, 210, 210, 255);
            BlacksmithStrongbox   = new ColorBGRA(210, 210, 210, 255);
            ArmourerStrongbox     = new ColorBGRA(210, 210, 210, 255);
            OrnateStrongbox       = new ColorBGRA(210, 210, 210, 255);
            LargeStrongbox        = new ColorBGRA(210, 210, 210, 255);
            PerandusStrongbox     = new ColorBGRA(175, 96, 37, 255);
            KaomStrongbox         = new ColorBGRA(175, 96, 37, 255);
            MalachaiStrongbox     = new ColorBGRA(175, 96, 37, 255);
            EpicStrongbox         = new ColorBGRA(175, 96, 37, 255);
            SimpleStrongbox       = new ColorBGRA(210, 210, 210, 255);

            OrraGreengate      = new ColorBGRA(254, 192, 118, 255);
            ThenaMoga          = new ColorBGRA(254, 192, 118, 255);
            AntalieNapora      = new ColorBGRA(254, 192, 118, 255);
            TorrOlgosso        = new ColorBGRA(254, 192, 118, 255);
            ArmiosBell         = new ColorBGRA(254, 192, 118, 255);
            ZacharieDesmarais  = new ColorBGRA(254, 192, 118, 255);
            MinaraAnenima      = new ColorBGRA(254, 192, 118, 255);
            IgnaPhoenix        = new ColorBGRA(254, 192, 118, 255);
            JonahUnchained     = new ColorBGRA(254, 192, 118, 255);
            DamoiTui           = new ColorBGRA(254, 192, 118, 255);
            XandroBlooddrinker = new ColorBGRA(254, 192, 118, 255);
            VickasGiantbone    = new ColorBGRA(254, 192, 118, 255);
            EoinGreyfur        = new ColorBGRA(254, 192, 118, 255);
            TinevinHighdove    = new ColorBGRA(254, 192, 118, 255);
            MagnusStonethorn   = new ColorBGRA(254, 192, 118, 255);
            IonDarkshroud      = new ColorBGRA(254, 192, 118, 255);
            AshLessard         = new ColorBGRA(254, 192, 118, 255);
            WilorinDemontamer  = new ColorBGRA(254, 192, 118, 255);
            AugustinaSolaria   = new ColorBGRA(254, 192, 118, 255);
            DenaLorenni        = new ColorBGRA(254, 192, 118, 255);
            VanthAgiel         = new ColorBGRA(254, 192, 118, 255);
            LaelFuria          = new ColorBGRA(254, 192, 118, 255);
            OyraOna            = new ColorBGRA(254, 192, 118, 255);
            BoltBrownfur       = new ColorBGRA(254, 192, 118, 255);
            AilentiaRac        = new ColorBGRA(254, 192, 118, 255);
            UlyssesMorvant     = new ColorBGRA(254, 192, 118, 255);
            AurelioVoidsinger  = new ColorBGRA(254, 192, 118, 255);
        }
Exemplo n.º 44
0
        /// <summary>
        ///     Base for all Constructors
        /// </summary>
        /// <param name="position">Circle Position</param>
        /// <param name="radius">Circle Radius</param>
        /// <param name="rotate">Circle Rotation</param>
        /// <param name="type">Circle Type</param>
        /// <param name="smooth">Smooth Circle</param>
        /// <param name="resolution">Circle Resolution</param>
        /// <param name="color">Circle Color</param>
        private void Base(Vector2 position,
                          float radius,
                          int rotate,
                          CircleType type,
                          bool smooth,
                          int resolution,
                          ColorBGRA color)
        {
            Smooth     = smooth;
            Resolution = resolution;

            var vertexVertices = new Vertex[resolution + 2];
            var angle          = rotate * System.Math.PI / 180;
            var x  = position.X;
            var y  = position.Y;
            var pi = (type == CircleType.Full)
                ? System.Math.PI
                : (type == CircleType.Half) ? System.Math.PI / 2 : System.Math.PI / 4;
            var device = Drawing.Direct3DDevice;

            #region Circle

            byte[] b   = { color.R, color.G, color.B, color.A };
            var    bgr = BitConverter.ToInt32(b, 0);

            for (var i = 0; i < vertexVertices.Length; ++i)
            {
                vertexVertices[i] = new Vertex
                {
                    X     = (float)(x - radius * System.Math.Cos(i * (2 * pi / resolution))),
                    Y     = (float)(y - radius * System.Math.Sin(i * (2 * pi / resolution))),
                    Z     = 0f,
                    Rhw   = 1f,
                    Color = bgr
                };
            }

            #endregion

            #region Set Angle

            for (var i = 0; i < vertexVertices.Length; ++i)
            {
                vertexVertices[i].X =
                    (float)
                    (x + System.Math.Cos(angle) * (vertexVertices[i].X - x) -
                     System.Math.Sin(angle) * (vertexVertices[i].Y - y));
                vertexVertices[i].Y =
                    (float)
                    (y + System.Math.Sin(angle) * (vertexVertices[i].X - x) -
                     System.Math.Cos(angle) * (vertexVertices[i].Y - y));
            }

            #endregion

            #region Buffer

            buffer = new VertexBuffer(
                device, vertexVertices.Length * Utilities.SizeOf <Vertex>(), Usage.WriteOnly, VertexFormat.Diffuse,
                Pool.Default);

            var vertices = buffer.Lock(0, vertexVertices.Length * Utilities.SizeOf <Vertex>(), LockFlags.None);
            foreach (var v in vertexVertices)
            {
                vertices.Write(v);
            }
            buffer.Unlock();

            #endregion
        }
Exemplo n.º 45
0
 public void ClearBackbuffer(ColorBGRA clearColor)
 {
     MyRender11.ClearBackbuffer(clearColor);
 }
Exemplo n.º 46
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Implementation of capturing from the render target of the Direct3D9 Device (or DeviceEx)
        /// </summary>
        ///
        /// <param name="device">   . </param>
        /// <param name="hook">     The hook. </param>
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        void DoCaptureRenderTarget(Device device, string hook)
        {
            // Auto hook disable.
            if (MessageQueue.Count == 0)
            {
                SetHookState(false);
                return;
            }

            try
            {
                if (MainFont != null && MainFont.Device.NativePointer != device.NativePointer)
                {
                    MainFont.Dispose();
                    MainFont = null;
                }
                if (MainFont == null)
                {
                    // Measure screen size after device creation.
                    using (var renderTarget = device.GetRenderTarget(0))
                    {
                        ScreenWidth  = renderTarget.Description.Width;
                        ScreenHeight = renderTarget.Description.Height;
                    }

                    MainFont = new Font(device, new FontDescription()
                    {
                        Height          = (int)(Math.Min(ScreenWidth, ScreenHeight) * 0.03),
                        FaceName        = "맑은 고딕",
                        CharacterSet    = FontCharacterSet.Default,
                        OutputPrecision = FontPrecision.ScreenOutline,
                        Quality         = FontQuality.ClearTypeNatural,
                        PitchAndFamily  = FontPitchAndFamily.Default,
                        Weight          = FontWeight.Regular
                    });
                }
                if (BackLine != null && BackLine.Device.NativePointer != device.NativePointer)
                {
                    BackLine.Dispose();
                    BackLine = null;
                }
                if (BackLine == null)
                {
                    BackLine = new Line(device)
                    {
                        Width = MainFont.Description.Height + 2
                    };
                }

                var fontColor = new ColorBGRA(0, 0, 0, 255);

                int i     = 0;
                var items = from pair in MessageQueue
                            where pair.Value.Begin < DateTime.Now
                            orderby pair.Value.Begin
                            select pair;

                float screenCenter      = ScreenWidth * 0.5F;
                float topMargin         = ScreenHeight * 0.725F;
                float spaceBetweenLines = MainFont.Description.Height * 1.4F;
                int   fontMarginX       = (int)(MainFont.Description.Height * 0.2F);
                int   fontCorrectionY   = (int)(MainFont.Description.Height * 0.5F);

                BackLine.Begin();
                foreach (var pair in items.ToArray())
                {
                    var entry = pair.Value;

                    if (entry is ProgressEntry)
                    {
                        ProgressEntry item = (ProgressEntry)entry;
                        Rectangle     rect = MainFont.MeasureText(null, item.Message, FontDrawFlags.SingleLine);

                        float   lineLength = rect.Right + fontMarginX * 2;
                        Vector2 lineStart  = new Vector2()
                        {
                            X = screenCenter - lineLength * 0.5F,
                            Y = i * spaceBetweenLines + topMargin
                        };
                        float     midPoint = lineStart.X + lineLength * item.Downloaded / item.Total;
                        Vector2[] line     = new Vector2[]
                        {
                            lineStart,
                            new Vector2(midPoint, lineStart.Y)
                        };
                        new Vector2(lineStart.X + lineLength, lineStart.Y);
                        BackLine.Draw(line, foreground);

                        // Reduce length by multiplying download rate.
                        line[0] = line[1];
                        line[1] = new Vector2(lineStart.X + lineLength, lineStart.Y);
                        BackLine.Draw(line, background);

                        MainFont.DrawText(null, item.Message,
                                          (int)lineStart.X + fontMarginX,
                                          (int)lineStart.Y - fontCorrectionY,
                                          fontColor);
                        i++;
                    }
                    else if (entry is NoticeEntry)
                    {
                        NoticeEntry item = (NoticeEntry)entry;
                        Rectangle   rect = MainFont.MeasureText(null, item.Message, FontDrawFlags.SingleLine);

                        var  endTime       = item.Begin + item.Duration;
                        var  remainingTime = endTime - DateTime.Now;
                        byte alpha;
                        if (remainingTime.TotalMilliseconds < 0)
                        {
                            MessageQueue.Remove(pair.Key);
                            alpha = 0;
                        }
                        else
                        {
                            alpha = (byte)Math.Min(remainingTime.TotalMilliseconds * 0.5, 255);
                        }
                        var noticeColor     = new ColorBGRA(255, 255, 32, alpha);
                        var noticeFontColor = new ColorBGRA(0, 0, 0, alpha);

                        float   lineLength = rect.Right + 2 * fontMarginX;
                        Vector2 lineStart  = new Vector2()
                        {
                            X = screenCenter - lineLength * 0.5F,
                            Y = i * spaceBetweenLines + topMargin
                        };
                        BackLine.Draw(new Vector2[]
                        {
                            lineStart,
                            new Vector2(lineStart.X + lineLength, lineStart.Y)
                        }, noticeColor);

                        MainFont.DrawText(null, item.Message,
                                          (int)lineStart.X + fontMarginX,
                                          (int)lineStart.Y - fontCorrectionY,
                                          noticeFontColor);
                        i++;
                    }
                }
                BackLine.End();
            }
            catch (Exception e)
            {
                MainWindowViewModel.LogException(e);
            }
        }
Exemplo n.º 47
0
 /// <summary>
 ///     Initializes static members of the <see cref="MenuSettings" /> class.
 ///     Default Settings Static Constructor.
 /// </summary>
 static BlueMenuSettings2()
 {
     ContainerSelectedColor = new ColorBGRA(0, 37, 53, 255);
 }
Exemplo n.º 48
0
        public static void DrawManaPercent(float dmg, ColorBGRA color)
        {
            Vector2 pos = GetHpPosAfterDmg(dmg);

            FillManaBar(pos, color);
        }
Exemplo n.º 49
0
        /// <summary>
        /// Loads a volume from memory.
        /// </summary>
        /// <param name="destPaletteRef"><para>Pointer to a  <see cref="SharpDX.Direct3D9.PaletteEntry"/> structure, the destination palette of 256 colors or <c>null</c>.</para></param>
        /// <param name="destBox"><para>Pointer to a <see cref="SharpDX.Direct3D9.Box"/> structure. Specifies the destination box. Set this parameter to <c>null</c> to specify the entire volume.</para></param>
        /// <param name="srcMemoryPointer"><para>Pointer to the top-left corner of the source volume in memory.</para></param>
        /// <param name="srcFormat"><para>Member of the <see cref="SharpDX.Direct3D9.Format"/> enumerated type, the pixel format of the source volume.</para></param>
        /// <param name="srcRowPitch"><para>Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one row of cells, in bytes.</para></param>
        /// <param name="srcSlicePitch"><para>Pitch of source image, in bytes. For DXT formats (compressed texture formats), this number should represent the size of one slice of cells, in bytes.</para></param>
        /// <param name="srcPaletteRef"><para>Pointer to a <see cref="SharpDX.Direct3D9.PaletteEntry"/> structure, the source palette of 256 colors or <c>null</c>.</para></param>
        /// <param name="srcBox"><para>Pointer to a <see cref="SharpDX.Direct3D9.Box"/> structure. Specifies the source box. <c>null</c> is not a valid value for this parameter.</para></param>
        /// <param name="filter"><para>A combination of one or more <see cref="SharpDX.Direct3D9.Filter"/> controlling how the image is filtered. Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying <see cref="SharpDX.Direct3D9.Filter.Triangle"/> | <see cref="SharpDX.Direct3D9.Filter.Dither"/>.</para></param>
        /// <param name="colorKey"><para> <see cref="SharpDX.Color4"/> value to replace with transparent black, or 0 to disable the colorkey. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque color keys. Thus, for opaque black, the value would be equal to 0xFF000000.</para></param>
        /// <returns>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, D3DXERR_INVALIDDATA.</returns>
        /// <remarks>
        /// Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If <see cref="SharpDX.Direct3D9.D3DX9.LoadVolumeFromMemory"/> is called and the texture was not already dirty (this is unlikely under normal usage scenarios), the application needs to explicitly call <see cref="SharpDX.Direct3D9.VolumeTexture.AddDirtyBox"/> on the volume texture.
        /// </remarks>
        /// <unmanaged>HRESULT D3DXLoadVolumeFromMemory([In] IDirect3DVolume9* pDestVolume,[Out, Buffer] const PALETTEENTRY* pDestPalette,[In] const void* pDestBox,[In] const void* pSrcMemory,[In] D3DFORMAT SrcFormat,[In] unsigned int SrcRowPitch,[In] unsigned int SrcSlicePitch,[In, Buffer] const PALETTEENTRY* pSrcPalette,[In] const void* pSrcBox,[In] D3DX_FILTER Filter,[In] int ColorKey)</unmanaged>
        public unsafe void LoadFromMemory(SharpDX.Direct3D9.PaletteEntry[] destPaletteRef, Box?destBox, System.IntPtr srcMemoryPointer, SharpDX.Direct3D9.Format srcFormat, int srcRowPitch, int srcSlicePitch, SharpDX.Direct3D9.PaletteEntry[] srcPaletteRef, Box srcBox, SharpDX.Direct3D9.Filter filter, ColorBGRA colorKey)
        {
            Box localDestBox;

            if (destBox.HasValue)
            {
                localDestBox = destBox.Value;
            }

            D3DX9.LoadVolumeFromMemory(
                this, destPaletteRef, new IntPtr(&localDestBox), srcMemoryPointer, srcFormat, srcRowPitch, srcSlicePitch, srcPaletteRef, new IntPtr(&srcBox), filter, colorKey.ToBgra());
        }
Exemplo n.º 50
0
        /// <summary>
        ///     Sets the notification text color
        /// </summary>
        /// <param name="color">System Drawing Color</param>
        public Notification SetTextColor(Color color)
        {
            TextColor = new ColorBGRA(color.R, color.G, color.B, color.A);

            return(this);
        }
Exemplo n.º 51
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AnimationPulsate" /> class.
 /// </summary>
 /// <param name="pulsateTimes">Pulsationtimes</param>
 /// <param name="duration">Selected duration for the defined animation</param>
 /// <param name="defaultCol">Default Color of the element</param>
 public AnimationPulsate(int pulsateTimes, float duration, ColorBGRA defaultCol)
     : base(duration)
 {
     this.pulsateTimes = pulsateTimes;
     this.startValue   = defaultCol;
 }
Exemplo n.º 52
0
        public static void DrawFontTextMap(Font vFont, string vText, Vector3 Pos, ColorBGRA vColor)
        {
            var wts = Drawing.WorldToScreen(Pos);

            vFont.DrawText(null, vText, (int)wts[0], (int)wts[1], vColor);
        }
Exemplo n.º 53
0
        /// <summary>
        ///     Draw a circle directly without instancing a new circle, external drawing method.
        /// </summary>
        /// <param name="position">Position to draw the Circle</param>
        /// <param name="radius">Circle Radius</param>
        /// <param name="rotate">Circle Rotation</param>
        /// <param name="type">Circle Type</param>
        /// <param name="smooth">Smooth Circle</param>
        /// <param name="resolution">Circle Resolution</param>
        /// <param name="color">Circle Color</param>
        public static void Draw(Vector2 position,
                                float radius,
                                int rotate,
                                CircleType type,
                                bool smooth,
                                int resolution,
                                ColorBGRA color)
        {
            var vertexVertices = new Vertex[resolution + 2];
            var angle          = rotate * System.Math.PI / 180;
            var x  = position.X;
            var y  = position.Y;
            var pi = (type == CircleType.Full)
                ? System.Math.PI
                : (type == CircleType.Half) ? System.Math.PI / 2 : System.Math.PI / 4;
            var device = Drawing.Direct3DDevice;

            #region Circle

            byte[] b   = { color.R, color.G, color.B, color.A };
            var    bgr = BitConverter.ToInt32(b, 0);

            for (var i = 0; i < vertexVertices.Length; ++i)
            {
                vertexVertices[i] = new Vertex
                {
                    X     = (float)(x - radius * System.Math.Cos(i * (2 * pi / resolution))),
                    Y     = (float)(y - radius * System.Math.Sin(i * (2 * pi / resolution))),
                    Z     = 0f,
                    Rhw   = 1f,
                    Color = bgr
                };
            }

            #endregion

            #region Set Angle

            for (var i = 0; i < vertexVertices.Length; ++i)
            {
                vertexVertices[i].X =
                    (float)
                    (x + System.Math.Cos(angle) * (vertexVertices[i].X - x) -
                     System.Math.Sin(angle) * (vertexVertices[i].Y - y));
                vertexVertices[i].Y =
                    (float)
                    (y + System.Math.Sin(angle) * (vertexVertices[i].X - x) -
                     System.Math.Cos(angle) * (vertexVertices[i].Y - y));
            }

            #endregion

            #region Buffer

            var buffer = new VertexBuffer(
                device, vertexVertices.Length * Utilities.SizeOf <Vertex>(), Usage.WriteOnly, VertexFormat.Diffuse,
                Pool.Default);

            var vertices = buffer.Lock(0, vertexVertices.Length * Utilities.SizeOf <Vertex>(), LockFlags.None);
            foreach (var v in vertexVertices)
            {
                vertices.Write(v);
            }
            buffer.Unlock();

            #endregion

            #region Draw

            var deviceOptions =
                new DeviceOption(device).AddRenderState(RenderState.AlphaBlendEnable, true)
                .AddTexture(0, null)
                .AddPixelShader(null)
                .AddRenderState(RenderState.SourceBlend, RenderState.SourceBlendAlpha)
                .AddRenderState(RenderState.DestinationBlend, RenderState.DestinationBlendAlpha)
                .AddStreamSource(0, buffer, 0, Utilities.SizeOf <Vertex>())
                .AddVertexFormat(VertexFormat.PositionRhw | VertexFormat.Diffuse);

            if (smooth)
            {
                deviceOptions.AddRenderState(RenderState.MultisampleAntialias, true);
                deviceOptions.AddRenderState(RenderState.AntialiasedLineEnable, true);
            }

            using (new DeviceOptions(deviceOptions))
            {
                device.DrawPrimitives(PrimitiveType.LineStrip, 0, resolution);
            }

            #endregion

            buffer.Dispose();
        }
Exemplo n.º 54
0
 /// <summary>
 ///     Converts a SharpDX Color to a System Color.
 /// </summary>
 /// <param name="color">
 ///     The color.
 /// </param>
 /// <returns>
 ///     The System Color instance.
 /// </returns>
 public static System.Drawing.Color ToSystemColor(this ColorBGRA color)
 {
     return(System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B));
 }
Exemplo n.º 55
0
 private static void DrawFontTextScreen(Font vFont, string vText, float vPosX, float vPosY, ColorBGRA vColor)
 {
     vFont.DrawText(null, vText, (int)vPosX, (int)vPosY, vColor);
 }
Exemplo n.º 56
0
 public static void DrawShadowText(string text, float x, float y, ColorBGRA color)
 {
     font.DrawText(null, text, (int)x, (int)y, color);
 }
Exemplo n.º 57
0
 public static void DrawFont(Font vFont, string vText, float vPosX, float vPosY, ColorBGRA vColor)
 {
     vFont.DrawText(null, vText, (int)vPosX, (int)vPosY, vColor);
 }
Exemplo n.º 58
0
 /// <summary>
 /// Changes the transparency of a color to 100%
 /// </summary>
 /// <param name="curTime">Current Time (seconds)</param>
 /// <param name="times">Pulsate times</param>
 /// <param name="val">Color</param>
 /// <param name="dur">Duration</param>
 /// <returns>New calculated color</returns>
 private ColorBGRA Pulsate(double curTime, int times, ColorBGRA val, double dur)
 {
     return((curTime % (dur / times) < (dur / times) / 2) ? new ColorBGRA(val.B, val.G, val.R, 0) : val);
 }
Exemplo n.º 59
0
        /// <summary>
        ///     Draws an Menu
        /// </summary>
        public override void Draw()
        {
            var position = this.Component.Position;

            if (this.hovering && !this.Component.Toggled && this.Component.Components.Count > 0)
            {
                Line.Width = MenuSettings.ContainerHeight;
                Line.Begin();
                Line.Draw(
                    new[]
                {
                    new Vector2(position.X, position.Y + MenuSettings.ContainerHeight / 2f),
                    new Vector2(
                        position.X + this.Component.MenuWidth,
                        position.Y + MenuSettings.ContainerHeight / 2f)
                },
                    MenuSettings.HoverColor);
                Line.End();
            }

            var centerY =
                (int)
                BlueUtilities.GetContainerRectangle(this.Component)
                .GetCenteredText(null, MenuSettings.Font, this.Component.DisplayName, CenteredFlags.VerticalCenter)
                .Y;

            MenuSettings.Font.DrawText(
                MenuManager.Instance.Sprite,
                this.Component.DisplayName,
                (int)(position.X + MenuSettings.ContainerTextOffset),
                centerY,
                MenuSettings.TextColor);

            MenuSettings.Font.DrawText(
                MenuManager.Instance.Sprite,
                "»",
                (int)
                (position.X + this.Component.MenuWidth - MenuSettings.ContainerTextMarkWidth
                 - MenuSettings.ContainerTextMarkOffset),
                centerY,
                this.Component.Components.Count > 0 ? MenuSettings.TextColor : MenuSettings.ContainerSeparatorColor);

            if (this.Component.Toggled)
            {
                Line.Width = this.Component.MenuWidth;
                Line.Begin();
                Line.Draw(
                    new[]
                {
                    new Vector2(position.X + this.Component.MenuWidth / 2f, position.Y),
                    new Vector2(
                        position.X + this.Component.MenuWidth / 2f,
                        position.Y + MenuSettings.ContainerHeight)
                },
                    MenuSettings.ContainerSelectedColor);
                Line.End();

                float height = MenuSettings.ContainerHeight * this.Component.Components.Count;
                var   width  = MenuSettings.ContainerWidth;
                if (this.Component.Components.Count > 0)
                {
                    width = this.Component.Components.First().Value.MenuWidth;
                }

                Line.Width = width;
                Line.Begin();
                Line.Draw(
                    new[]
                {
                    new Vector2((position.X + this.Component.MenuWidth) + width / 2, position.Y),
                    new Vector2((position.X + this.Component.MenuWidth) + width / 2, position.Y + height)
                },
                    MenuSettings.RootContainerColor);
                Line.End();



                for (var i = 0; i < this.Component.Components.Count; ++i)
                {
                    var childComponent = this.Component.Components.Values.ToList()[i];
                    if (childComponent != null)
                    {
                        var childPos = new Vector2(
                            position.X + this.Component.MenuWidth,
                            position.Y + i * MenuSettings.ContainerHeight);

                        if (i < this.Component.Components.Count - 1)
                        {
                            Line.Width = 1f;
                            Line.Begin();
                            Line.Draw(
                                new[]
                            {
                                new Vector2(childPos.X + 15, childPos.Y + MenuSettings.ContainerHeight),
                                new Vector2(
                                    childPos.X - 15 + childComponent.MenuWidth,
                                    childPos.Y + MenuSettings.ContainerHeight)
                            },
                                MenuSettings.ContainerSeparatorColor);
                            Line.End();
                        }

                        childComponent.OnDraw(childPos);
                    }
                }

                var contourColor = new ColorBGRA(21, 26, 45, 255);

                Line.Width = 1f;
                Line.Begin();
                Line.Draw(
                    new[]
                {
                    new Vector2(position.X + this.Component.MenuWidth, position.Y),
                    new Vector2(position.X + this.Component.MenuWidth + width, position.Y)
                },
                    contourColor);
                Line.Draw(
                    new[]
                {
                    new Vector2(position.X + this.Component.MenuWidth, position.Y + height),
                    new Vector2(position.X + this.Component.MenuWidth + width, position.Y + height)
                },
                    contourColor);
                Line.Draw(
                    new[]
                {
                    new Vector2(position.X + this.Component.MenuWidth, position.Y),
                    new Vector2(position.X + this.Component.MenuWidth, position.Y + height)
                },
                    contourColor);
                Line.Draw(
                    new[]
                {
                    new Vector2(position.X + this.Component.MenuWidth + width, position.Y),
                    new Vector2(position.X + this.Component.MenuWidth + width, position.Y + height)
                },
                    contourColor);
                Line.End();
            }

            if (this.hasDragged && !MenuCustomizer.Instance.LockPosition.Value)
            {
                var sprite    = MenuManager.Instance.Sprite;
                var oldMatrix = sprite.Transform;
                var y         =
                    (int)(MenuSettings.Position.Y + (MenuManager.Instance.Menus.Count * MenuSettings.ContainerHeight));
                var dragTexture = BlueTextures.Instance[BlueTexture.Dragging];
                var x           = MenuSettings.Position.X - dragTexture.Width;
                sprite.Transform = Matrix.Translation(x - 1, y + 2, 0);
                sprite.Draw(dragTexture.Texture, Color.White);
                sprite.Transform = oldMatrix;

                Line.Width = 1f;
                Line.Begin();
                Line.Draw(
                    new[]
                {
                    new Vector2(x - 1, y + 1), new Vector2(x - 1 + dragTexture.Width, y + 1),
                    new Vector2(x - 1 + dragTexture.Width, y + dragTexture.Width + 2),
                    new Vector2(x - 2, y + dragTexture.Width + 2), new Vector2(x - 2, y),
                },
                    MenuSettings.ContainerSeparatorColor);
                Line.End();
            }
        }
        public PreloadAlertSettings()
        {
            Enable            = true;
            Masters           = true;
            Exiles            = true;
            Strongboxes       = true;
            CorruptedTitle    = true;
            TextSize          = new RangeNode <int>(16, 10, 50);
            BackgroundColor   = new ColorBGRA(0, 0, 0, 255);
            DefaultTextColor  = new ColorBGRA(210, 210, 210, 255);
            AreaTextColor     = new ColorBGRA(150, 200, 250, 255);
            HasCorruptedArea  = new ColorBGRA(208, 31, 144, 255);
            StoneDeviceColor  = new ColorBGRA(255, 255, 255, 255);
            TalismanModsColor = new ColorBGRA(215, 90, 175, 255);

            MasterZana     = new ColorBGRA(255, 2550, 0, 255);
            MasterCatarina = new ColorBGRA(100, 255, 255, 255);
            MasterTora     = new ColorBGRA(100, 255, 255, 255);
            MasterVorici   = new ColorBGRA(100, 255, 255, 255);
            MasterHaku     = new ColorBGRA(100, 255, 255, 255);
            MasterElreon   = new ColorBGRA(100, 255, 255, 255);
            MasterVagan    = new ColorBGRA(100, 255, 255, 255);
            MasterKrillson = new ColorBGRA(255, 0, 255, 255);

            ArcanistStrongbox     = new ColorBGRA(255, 0, 255, 255);
            ArtisanStrongbox      = new ColorBGRA(210, 210, 210, 255);
            CartographerStrongbox = new ColorBGRA(255, 255, 0, 255);
            GemcutterStrongbox    = new ColorBGRA(27, 162, 155, 255);
            JewellerStrongbox     = new ColorBGRA(210, 210, 210, 255);
            BlacksmithStrongbox   = new ColorBGRA(210, 210, 210, 255);
            ArmourerStrongbox     = new ColorBGRA(210, 210, 210, 255);
            OrnateStrongbox       = new ColorBGRA(210, 210, 210, 255);
            LargeStrongbox        = new ColorBGRA(210, 210, 210, 255);
            PerandusStrongbox     = new ColorBGRA(175, 96, 37, 255);
            KaomStrongbox         = new ColorBGRA(175, 96, 37, 255);
            MalachaiStrongbox     = new ColorBGRA(175, 96, 37, 255);
            EpicStrongbox         = new ColorBGRA(175, 96, 37, 255);
            SimpleStrongbox       = new ColorBGRA(210, 210, 210, 255);

            OrraGreengate      = new ColorBGRA(254, 192, 118, 255);
            ThenaMoga          = new ColorBGRA(254, 192, 118, 255);
            AntalieNapora      = new ColorBGRA(254, 192, 118, 255);
            TorrOlgosso        = new ColorBGRA(254, 192, 118, 255);
            ArmiosBell         = new ColorBGRA(254, 192, 118, 255);
            ZacharieDesmarais  = new ColorBGRA(254, 192, 118, 255);
            MinaraAnenima      = new ColorBGRA(254, 192, 118, 255);
            IgnaPhoenix        = new ColorBGRA(254, 192, 118, 255);
            JonahUnchained     = new ColorBGRA(254, 192, 118, 255);
            DamoiTui           = new ColorBGRA(254, 192, 118, 255);
            XandroBlooddrinker = new ColorBGRA(254, 192, 118, 255);
            VickasGiantbone    = new ColorBGRA(254, 192, 118, 255);
            EoinGreyfur        = new ColorBGRA(254, 192, 118, 255);
            TinevinHighdove    = new ColorBGRA(254, 192, 118, 255);
            MagnusStonethorn   = new ColorBGRA(254, 192, 118, 255);
            IonDarkshroud      = new ColorBGRA(254, 192, 118, 255);
            AshLessard         = new ColorBGRA(254, 192, 118, 255);
            WilorinDemontamer  = new ColorBGRA(254, 192, 118, 255);
            AugustinaSolaria   = new ColorBGRA(254, 192, 118, 255);
            DenaLorenni        = new ColorBGRA(254, 192, 118, 255);
            VanthAgiel         = new ColorBGRA(254, 192, 118, 255);
            LaelFuria          = new ColorBGRA(254, 192, 118, 255);
        }