mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-30 14:23:12 +00:00
0d45075d4b
- Settings now stored as json next to exe - Settings now exposes all legality checking setttings that can be changed - Slot hovering now can play cries in MGDB/PKMDB/etc, not just the main boxes. - Enhanced hover text for mystery gifts and encounters that have movesets - Show recently loaded save files in ctrl-f browser - Toggle auto-load savefile setting to be none/detect-latest/last-loaded - Custom extensions & extra backup paths can now be configured directly in the json settings - Settings editor now uses propertygrid & tabs.
24 lines
1.2 KiB
C#
24 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace PKHeX.Core
|
|
{
|
|
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter)]
|
|
public sealed class LocalizedDescriptionAttribute : DescriptionAttribute
|
|
{
|
|
public static IReadOnlyDictionary<string, string> Localizer { private get; set; } = new Dictionary<string, string>();
|
|
|
|
public readonly string Fallback;
|
|
public readonly string Key;
|
|
|
|
public LocalizedDescriptionAttribute(string fallback, [CallerMemberName] string? key = null)
|
|
{
|
|
Key = $"LocalizedDescription.{key!}";
|
|
Fallback = fallback;
|
|
}
|
|
|
|
public override string Description => Localizer.TryGetValue(Key, out var result) ? result : Fallback;
|
|
}
|
|
}
|