You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CfgString SavegamesPath = new CfgString("SavegamesPath")
Miris:
instead of storing the value in an enum, why not store it in a constant within the class?
(this is where abstract works!)
publicabstractclassCfgSettingBase{publicabstractintID{get;}publicabstractstringName{get;}publicabstractstringDescription{get;}publicintValue{get;set;}}publicclassSomeCfgSetting:CfgSettingBase{publicoverrideintID{get;}=1;publicoverridestringName{get;}="some name";publicoverridestringDescription{get;}="and a description";}varsetting= SomeCfgSetting();
setting.Value =4;
Console.WriteLine(setting.Name);// some name
Console.WriteLine(Value);// 4
Miris:
ah actually, you won't even need constants
just check the object type
...but still need to match each Mode to 0, 1, or 2.
publicabstractclassConfigurationMode{publicabstractstringName{get;}publicabstractstringDescription{get;}}publicclassHceConfigurationMode:ConfigurationMode{publicoverridestringName{get;}="HCE";publicoverridestringDescription{get;}="Launch HXE in HCE mode";}publicclassSpv32ConfigurationMode:ConfigurationMode{publicoverridestringName{get;}="SPV32";publicoverridestringDescription{get;}="Launch HXE in SPV3.2 mode";}ConfigurationModemode=new HceConfigurationMode();if(mode.TypeOf(HceConfigurationMode)){// HCE Configuration Mode!}
The text was updated successfully, but these errors were encountered:
Some settings may need to be in multiple categories e.g. Auto-Uncrouch will need to be in both Input and Chimera.
A Tags or Categories property should work.
Should the property be a Flag Enum, String collection, or something else?
If Flag enum, how should the enums value be defined?
UInt for that extra digit.
Add descriptions to all config settings
Descriptions
Remember to add Descriptions to the
Blam
fields and properties in addition toConfiguration
properties!We'll use the built-in Descriptions attribute e.g.
To make this easier on ourselves, we can use ProductivityTools.DescriptionValue
Category Tags/Flags
To help with sorting, organizing, or searching settings, we should use the built-in Category attribute.
Some settings may need to be in multiple categories e.g. Auto-Uncrouch will need to be in both Input and Chimera.
old ideas
Old "Flag enum" Categories. Use Abstract and implementing classes instead.
If Flag enum, how should the enums value be defined?
UInt for that extra digit.
Remember: use
Enum.HasFlag(enum)
for less workOld "Type with Description property". Use Description attribute instead.
CfgString SavegamesPath = new CfgString("SavegamesPath")
Miris:
Miris:
The text was updated successfully, but these errors were encountered: