コード例 #1
0
        public void PaintTopInGame(ClipState clipState)
        {
            if (Hud.Render.UiHidden)
            {
                return;
            }
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            if ((Hud.Game.MapMode == MapMode.WaypointMap) || (Hud.Game.MapMode == MapMode.ActMap))
            {
                return;
            }

            if (!ShowInTown && Hud.Game.IsInTown)
            {
                return;
            }
            if (!ShowOutOfTown && !Hud.Game.IsInTown)
            {
                return;
            }

            var uiRect = Hud.Render.InGameBottomHudUiElement.Rectangle;

            var w = Hud.Window.Size.Height * 0.017f;
            var h = Hud.Window.Size.Height * 0.014f;

            var x = uiRect.Left + uiRect.Width * 0.09f;
            var y = uiRect.Bottom - h - (Hud.Window.Size.Height / 600);

            EliteDecorator.Paint(x + w * 0, y, w, h, HorizontalAlign.Center);
            PhysicalDecorator.Paint(x + w * 1, y, w, h, HorizontalAlign.Center);
            FireDecorator.Paint(x + w * 2, y, w, h, HorizontalAlign.Center);
            LightningDecorator.Paint(x + w * 3, y, w, h, HorizontalAlign.Center);
            ColdDecorator.Paint(x + w * 4, y, w, h, HorizontalAlign.Center);
            PoisonDecorator.Paint(x + w * 5, y, w, h, HorizontalAlign.Center);
            ArcaneDecorator.Paint(x + w * 6, y, w, h, HorizontalAlign.Center);
            HolyDecorator.Paint(x + w * 7, y, w, h, HorizontalAlign.Center);
        }
コード例 #2
0
ファイル: DamageBonusPlugin.cs プロジェクト: cThana7os/hud
        public void PaintTopInGame(ClipState clipState)
        {
            if (Hud.Render.UiHidden)
            {
                return;
            }
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }

            if (!ShowInTown && Hud.Game.IsInTown)
            {
                return;
            }
            if (!ShowOutOfTown && !Hud.Game.IsInTown)
            {
                return;
            }

            var uiRect = Hud.Render.GetUiElement("Root.NormalLayer.game_dialog_backgroundScreenPC.game_window_hud_overlay").Rectangle;

            var w = Hud.Window.Size.Height * 0.017f;
            var h = Hud.Window.Size.Height * 0.014f;

            var x = uiRect.Left + uiRect.Width * 0.09f;
            var y = uiRect.Bottom - h - (Hud.Window.Size.Height / 600);

            EliteDecorator.Paint(x + w * 0, y, w, h, HorizontalAlign.Center);
            PhysicalDecorator.Paint(x + w * 1, y, w, h, HorizontalAlign.Center);
            FireDecorator.Paint(x + w * 2, y, w, h, HorizontalAlign.Center);
            LightningDecorator.Paint(x + w * 3, y, w, h, HorizontalAlign.Center);
            ColdDecorator.Paint(x + w * 4, y, w, h, HorizontalAlign.Center);
            PoisonDecorator.Paint(x + w * 5, y, w, h, HorizontalAlign.Center);
            ArcaneDecorator.Paint(x + w * 6, y, w, h, HorizontalAlign.Center);
            HolyDecorator.Paint(x + w * 7, y, w, h, HorizontalAlign.Center);
        }