mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-28 03:27:14 -05:00
* Update to .NET 10 * Property fields * API signature updates * Extension method blocks * Completed dark mode support Outside of my control: - vertical tab control (pkm editor) - datetimepicker controls - lgpe event flags (no idea) - some control types having white-borders when they should really be gray Box background is 50% transparency to effectively darken the image. * Custom legality report popup * Event diff dialog, version select dialog * Add quick overwrite popup for export sav * Extension methods * Dark Mode: glow currently editing sprite * Add invalid encounter hint for trade evolutions * Extension properties * Append legality hint on hover card * Slot image loading: clear the screen-reader description if a slot is empty/invalid, rather than retain the previous description. Changing boxes would easily confuse users on this.
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using System.ComponentModel;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Drawing;
|
|
using System.Text.Json.Serialization;
|
|
using PKHeX.Core;
|
|
|
|
namespace PKHeX.WinForms;
|
|
|
|
/// <summary>
|
|
/// Drawing Configuration for painting and updating controls
|
|
/// </summary>
|
|
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)]
|
|
public sealed class DrawConfig
|
|
{
|
|
private const string PKM = "Pokémon Editor";
|
|
|
|
[JsonIgnore, Browsable(false)] public Color GlowInitial => SystemColors.ActiveCaption;
|
|
[JsonIgnore, Browsable(false)] public Color GlowFinal => SystemColors.Highlight;
|
|
[JsonIgnore, Browsable(false)] public Color MarkDefault => SystemColors.ControlText;
|
|
|
|
#region PKM
|
|
|
|
[Category(PKM), LocalizedDescription("Background color of a ComboBox when the selected item is not valid.")]
|
|
public Color InvalidSelection { get; set; } = Color.DarkSalmon;
|
|
|
|
[Category(PKM), LocalizedDescription("Blue colored marking.")]
|
|
public Color MarkBlue { get; set; } = Color.FromArgb(000, 191, 255);
|
|
|
|
[Category(PKM), LocalizedDescription("Pink colored marking.")]
|
|
public Color MarkPink { get; set; } = Color.FromArgb(255, 117, 179);
|
|
|
|
[Category(PKM), LocalizedDescription("Shiny star when using unicode characters.")]
|
|
public string ShinyUnicode { get; set; } = "☆";
|
|
|
|
[Category(PKM), LocalizedDescription("Shiny star when not using unicode characters.")]
|
|
public string ShinyDefault { get; set; } = "*";
|
|
|
|
#endregion
|
|
|
|
public bool GetMarkingColor(MarkingColor markval, out Color c)
|
|
{
|
|
switch (markval)
|
|
{
|
|
case MarkingColor.Blue: c = MarkBlue; return true;
|
|
case MarkingColor.Pink: c = MarkPink; return true;
|
|
default: c = MarkDefault; return false; // recolor not required
|
|
}
|
|
}
|
|
}
|