mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
more stuff
This commit is contained in:
1 parent
57bab258e5
commit
8b2d24ccc1
8 files changed
+46
-57
No files matched your search
@@ -10,68 +10,37 @@ namespace MiraAPI.Example;
|
||||
public class ExampleLocalSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
{
|
||||
public override string TabName => "Mira Example";
|
||||
protected override bool ShouldCreateLabels => false;
|
||||
|
||||
public override LocalSettingTabAppearance TabAppearance => new()
|
||||
{
|
||||
TabColor = Color.cyan,
|
||||
ToggleActiveColor = Color.blue,
|
||||
ToggleInactiveColor = Color.red,
|
||||
SliderHoverColor = Color.magenta,
|
||||
};
|
||||
|
||||
[LocalSliderSetting(min: 0, max: 15, suffixType: MiraNumberSuffixes.Multiplier)]
|
||||
public ConfigEntry<float> ExampleFloatEntry { get; private set; } = config.Bind("General", "Example Float Setting", 50f);
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ExampleToggle { get; private set; } = config.Bind("General", "Example Bool", true);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> PlayStartupSound { get; private set; } = config.Bind("Audio", "Play Startup Sound", true);
|
||||
[LocalToggleSetting]
|
||||
public ConfigEntry<bool> ExampleToggle2 { get; private set; } = config.Bind("General", "Example Bool 2", false);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> MuteInBackground { get; private set; } = config.Bind("Audio", "Mute In Background", false);
|
||||
[LocalSliderSetting(suffixType: MiraNumberSuffixes.Percent, formatString: "0", roundValue: true)]
|
||||
public ConfigEntry<float> ExampleSlider { get; private set; } = config.Bind("General", "Slider", 50f);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> AutoSaveEnabled { get; private set; } = config.Bind("General", "Auto Save Enabled", true);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableCloudSync { get; private set; } = config.Bind("General", "Enable Cloud Sync", false);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> ShowAdvancedTooltips { get; private set; } = config.Bind("UI", "Show Advanced Tooltips", true);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> CompactUI { get; private set; } = config.Bind("UI", "Compact UI Layout", false);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableControllerSupport { get; private set; } = config.Bind("Input", "Enable Controller Support", true);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableVibration { get; private set; } = config.Bind("Input", "Enable Controller Vibration", true);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> ShowPlayerNames { get; private set; } = config.Bind("Gameplay", "Show Player Names", true);
|
||||
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableHardMode { get; private set; } = config.Bind("Gameplay", "Enable Hard Mode", false);
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableHardMode2 { get; private set; } = config.Bind("Gameplay", "Enable Hard Mode", false);
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableHardMode3 { get; private set; } = config.Bind("Gameplay", "Enable Hard Mode", false);
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableHardMode4 { get; private set; } = config.Bind("Gameplay", "Enable Hard Mode", false);
|
||||
[LocalSettingToggle]
|
||||
public ConfigEntry<bool> EnableHardMode5 { get; private set; } = config.Bind("Gameplay", "Enable Hard Mode", false);
|
||||
|
||||
[LocalNumberSetting]
|
||||
public ConfigEntry<int> NumberExample { get; private set; } = config.Bind("Gameplay", "Number of cheeseburgers", 3);
|
||||
[LocalNumberSetting(suffixType: MiraNumberSuffixes.Seconds)]
|
||||
public ConfigEntry<int> ExampleNumber { get; private set; } = config.Bind("General", "Example Number", 4);
|
||||
|
||||
[LocalEnumSetting]
|
||||
public ConfigEntry<ExampleSettingEnum> EnumExample { get; private set; } = config.Bind("Gameplay", "Anything else", ExampleSettingEnum.Fries);
|
||||
public ConfigEntry<ExampleEnumSetting> ExampleEnum { get; private set; } = config.Bind("General", "Example Enum", ExampleEnumSetting.Fries);
|
||||
}
|
||||
|
||||
public enum ExampleSettingEnum
|
||||
public enum ExampleEnumSetting
|
||||
{
|
||||
Cheeseburger,
|
||||
Sandwich,
|
||||
Fries,
|
||||
OnionRings,
|
||||
ChickenNuggets,
|
||||
Gun,
|
||||
}
|
||||
|
||||
public class Tab1(ConfigFile config) : LocalSettingsTab(config) { public override string TabName => "Tab"; public override LocalSettingTabAppearance TabAppearance => new(); }
|
||||
|
||||
Reference in new issue
Block a user