예제 #1
0
        public void Draw(LabelDrawInfo info)
        {
            var variantsPos = info.MasterRect.TopLeft;

            variantsPos.Y += 40;


            foreach (var variant in info.MasterRewards)
            {
                if (variant.Fraction == info.State.Job.Name)
                {
                    continue;
                }

                var curDrawPos = variantsPos.Translate(15, 5);
                if (!info.RestrictRect.Contains(curDrawPos) || info.IsEventGuy)
                {
                    var textSize = Graphics.DrawText(variant.Reward + " :", FontSize, curDrawPos, Settings.SwapColor.Value);

                    Graphics.DrawBox(new RectangleF(curDrawPos.X - 5, curDrawPos.Y, textSize.Width + 20, textSize.Height + 1), Color.Black);

                    curDrawPos = curDrawPos.Translate(textSize.Width + 5, 0);
                    Graphics.DrawText(variant.Fraction[0].ToString(), FontSize, curDrawPos, Color.IndianRed);
                }

                variantsPos.Y += FontSize * 1.2f;
            }
        }
예제 #2
0
        public void Draw(LabelDrawInfo info)
        {
            var champNamePos = info.MasterRect.Center.Translate(0, -info.MasterRect.Height / 2 + 5);

            if (info.RestrictRect.Contains(champNamePos) && !info.IsEventGuy)
            {
                return;
            }

            var champNameSize = Graphics.DrawText(
                $"{info.State.Target.Name}: {(info.State.Job.Name[0] == 'N' ? '-' : info.State.Job.Name[0])} {new string('*', info.State.Rank.RankInt)}",
                (int)Math.Round(FontSize * 1.5f),
                champNamePos,
                Color.White, FontDrawFlags.Center | FontDrawFlags.Top);

            Graphics.DrawBox(new RectangleF(champNamePos.X - champNameSize.Width / 2f - 5, champNamePos.Y - 1, champNameSize.Width + 10, champNameSize.Height + 1), Color.Black);
        }
예제 #3
0
        public void Draw(LabelDrawInfo info)
        {
            if (info.RewardConfig == null || string.IsNullOrEmpty(info.RewardConfig.Reward))
            {
                return;
            }

            var rewardDrawPos = info.MasterRect.Center.Translate(0, info.MasterRect.Height / 2 - FontSize - 15);

            if (info.RestrictRect.Contains(rewardDrawPos) && !info.IsEventGuy)
            {
                return;
            }

            var textSize = Graphics.DrawText(info.RewardConfig.Reward, FontSize, rewardDrawPos, Settings.RewardColor.Value, FontDrawFlags.Center | FontDrawFlags.Top);

            Graphics.DrawBox(new RectangleF(rewardDrawPos.X - textSize.Width / 2f - 5, rewardDrawPos.Y, textSize.Width + 10, textSize.Height + 1), Color.Black);
        }