コード例 #1
0
ファイル: UIAdvancement.cs プロジェクト: DarwinBaker/AATool
        public override void DrawRecursive(Display display)
        {
            if (Advancement is Achievement && scale == 2)
            {
                if ((Advancement as Achievement).CanBeDoneYet)
                {
                    icon?.SetTint(Color.White);
                    frame?.SetTint(Color.White);
                    label?.SetTextColor(MainSettings.Instance.TextColor);
                }
                else
                {
                    icon?.SetTint(Color.Gray * 0.1f);
                    frame?.SetTint(Color.Gray * 0.2f);
                    label?.SetTextColor(MainSettings.Instance.TextColor * 0.5f);
                }
            }

            frame?.DrawRecursive(display);
            if (IsCompleted && MainSettings.Instance.RenderCompletionGlow)
            {
                display.Draw("frame_glow", frame.Center.ToVector2(), glowRotation, Color.White, Layer.Glow);
            }

            icon?.DrawRecursive(display);
            label?.DrawRecursive(display);
        }
コード例 #2
0
 protected override void UpdateThis(Time time)
 {
     if (criterion != null)
     {
         if (IsStatic)
         {
             icon?.SetTint(Color.White);
         }
         else
         {
             icon?.SetTint(criterion.IsCompleted ? Color.White : Color.White * 0.35f);
         }
     }
 }