use DescribableEnumConverter for GB and NDS

This commit is contained in:
CasualPokePlayer 2021-10-27 20:59:15 -07:00
parent 9138859bf5
commit 1dd7640161
2 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
@ -269,14 +270,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
public enum FrameLengthType
{
[Display(Name = "VBlank Driven Frames")]
VBlankDrivenFrames,
[Display(Name = "Equal Length Frames")]
EqualLengthFrames,
[Display(Name = "User Defined Frames")]
UserDefinedFrames
}
[DisplayName("Frame Length")]
[Description("Sets how long an emulation frame will last.\nVBlank Driven Frames will make emulation frames sync to VBlank. Recommended for TASing.\nEqual Length Frames will force all frames to emit 35112 samples. Legacy, not recommended for TASing.\nUser Defined Frames allows for the user to define how many samples are emitted for each frame. Only useful if sub-frame input is desired.")]
[DefaultValue(FrameLengthType.VBlankDrivenFrames)]
[TypeConverter(typeof(DescribableEnumConverter))]
public FrameLengthType FrameLength { get; set; }
[DisplayName("Display BG")]

View File

@ -3,6 +3,7 @@ using BizHawk.Emulation.Common;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
@ -133,13 +134,16 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
public enum StartUp : int
{
[Display(Name = "Auto Boot")]
AutoBoot,
[Display(Name = "Manual Boot")]
ManualBoot,
}
[DisplayName("Firmware Start-Up")]
[Description("The way firmware is booted. Auto Boot will go to the game immediately, while Manual Boot will go into the firmware menu. Only applicable if firmware override is in effect.")]
[DefaultValue(StartUp.AutoBoot)]
[TypeConverter(typeof(DescribableEnumConverter))]
public StartUp FirmwareStartUp { get; set; }
[JsonIgnore]
@ -215,27 +219,37 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
public enum Color : int
{
[Display(Name = "Greyish Blue")]
GreyishBlue,
Brown,
Red,
[Display(Name = "Light Pink")]
LightPink,
Orange,
Yellow,
Lime,
[Display(Name = "Light Green")]
LightGreen,
[Display(Name = "Dark Green")]
DarkGreen,
Turqoise,
[Display(Name = "Light Blue")]
LightBlue,
Blue,
[Display(Name = "Dark Blue")]
DarkBlue,
[Display(Name = "Dark Purple")]
DarkPurple,
[Display(Name = "Light Purple")]
LightPurple,
[Display(Name = "Dark Pink")]
DarkPink,
}
[DisplayName("Firmware Favorite Color")]
[Description("Favorite color in firmware. Only applicable if firmware override is in effect.")]
[DefaultValue(Color.Red)]
[TypeConverter(typeof(DescribableEnumConverter))]
public Color FirmwareFavouriteColour { get; set; }
[JsonIgnore]