Skip to content

Commit

Permalink
Add headers, fix descriptions, remove unused settings attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
catapillie committed Apr 23, 2022
1 parent 9d4b73d commit 68b47ce
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 67 deletions.
26 changes: 0 additions & 26 deletions Code/PrideModModuleSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,70 +12,44 @@ public class PrideModModuleSettings : EverestModuleSettings {
public bool MinimalBloom { get; set; } = true;


[SettingName("modoptions_PrideMod_ASideCrystalHeart")]
[SettingSubText("modoptions_PrideMod_ASideCrystalHeart_sub")]
[SettingIgnore]
public PrideTypes ASideCrystalHeart { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_BSideCrystalHeart")]
[SettingSubText("modoptions_PrideMod_BSideCrystalHeart_sub")]
[SettingIgnore]
public PrideTypes BSideCrystalHeart { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_CSideCrystalHeart")]
[SettingSubText("modoptions_PrideMod_CSideCrystalHeart_sub")]
[SettingIgnore]
public PrideTypes CSideCrystalHeart { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_EmptyCrystalHeart")]
[SettingSubText("modoptions_PrideMod_EmptyCrystalHeart_sub")]
[SettingIgnore]
public PrideTypes EmptyCrystalHeart { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_GhostCrystalHeart")]
[SettingSubText("modoptions_PrideMod_GhostCrystalHeart_sub")]
[SettingIgnore]
public PrideTypes GhostCrystalHeart { get; set; } = PrideTypes.Default;


[SettingName("modoptions_PrideMod_Strawberry")]
[SettingSubText("modoptions_PrideMod_Strawberry_sub")]
[SettingIgnore]
public PrideTypes Strawberry { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_GhostStrawberry")]
[SettingSubText("modoptions_PrideMod_GhostStrawberry_sub")]
[SettingIgnore]
public PrideTypes GhostStrawberry { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_GoldenStrawberry")]
[SettingSubText("modoptions_PrideMod_GoldenStrawberry_sub")]
[SettingIgnore]
public PrideTypes GoldenStrawberry { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_GhostGoldenStrawberry")]
[SettingSubText("modoptions_PrideMod_GhostGoldenStrawberry_sub")]
[SettingIgnore]
public PrideTypes GhostGoldenStrawberry { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_SilverStrawberry")]
[SettingSubText("modoptions_PrideMod_SilverStrawberry_sub")]
[SettingIgnore]
public PrideTypes SilverStrawberry { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_GhostSilverStrawberry")]
[SettingSubText("modoptions_PrideMod_GhostSilverStrawberry_sub")]
[SettingIgnore]
public PrideTypes GhostSilverStrawberry { get; set; } = PrideTypes.Default;


[SettingName("modoptions_PrideMod_SummitFlag")]
[SettingSubText("modoptions_PrideMod_SummitFlag_sub")]
[SettingIgnore]
public PrideTypes SummitFlag { get; set; } = PrideTypes.Default;

[SettingName("modoptions_PrideMod_FinalFlag")]
[SettingSubText("modoptions_PrideMod_FinalFlag_sub")]
[SettingIgnore]
public PrideTypes FinalFlag { get; set; } = PrideTypes.Default;

Expand Down
97 changes: 56 additions & 41 deletions Code/UI/OuiPrideSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,106 +9,118 @@ public OuiPrideSettings()
protected override void addOptionsToMenu(TextMenu menu, bool inGame, object[] parameters) {
PrideModModuleSettings settings = PrideModModule.Settings;

TextMenu.Item Item_ASideCrystalHeart = CreatePrideSettingSlider(

TextMenu.SubHeader header_CrystalHearts = CreateSubHeader("modoptions_PrideMod_header_CrystalHearts");
TextMenu.Item item_ASideCrystalHeart = CreatePrideSettingSlider(
"modoptions_PrideMod_ASideCrystalHeart",
settings.ASideCrystalHeart,
prideType => settings.ASideCrystalHeart = prideType
);
TextMenu.Item Item_BSideCrystalHeart = CreatePrideSettingSlider(
TextMenu.Item item_BSideCrystalHeart = CreatePrideSettingSlider(
"modoptions_PrideMod_BSideCrystalHeart",
settings.BSideCrystalHeart,
prideType => settings.BSideCrystalHeart = prideType
);
TextMenu.Item Item_CSideCrystalHeart = CreatePrideSettingSlider(
TextMenu.Item item_CSideCrystalHeart = CreatePrideSettingSlider(
"modoptions_PrideMod_CSideCrystalHeart",
settings.CSideCrystalHeart,
prideType => settings.CSideCrystalHeart = prideType
);
TextMenu.Item Item_EmptyCrystalHeart = CreatePrideSettingSlider(
TextMenu.Item item_EmptyCrystalHeart = CreatePrideSettingSlider(
"modoptions_PrideMod_EmptyCrystalHeart",
settings.EmptyCrystalHeart,
prideType => settings.EmptyCrystalHeart = prideType
);
TextMenu.Item Item_GhostCrystalHeart = CreatePrideSettingSlider(
TextMenu.Item item_GhostCrystalHeart = CreatePrideSettingSlider(
"modoptions_PrideMod_GhostCrystalHeart",
settings.GhostCrystalHeart,
prideType => settings.GhostCrystalHeart = prideType
);

TextMenu.Item Item_Strawberry = CreatePrideSettingSlider(

TextMenu.SubHeader header_Strawberries = CreateSubHeader("modoptions_PrideMod_header_Strawberries");
TextMenu.Item item_Strawberry = CreatePrideSettingSlider(
"modoptions_PrideMod_Strawberry",
settings.Strawberry,
prideType => settings.Strawberry = prideType
);
TextMenu.Item Item_GhostStrawberry = CreatePrideSettingSlider(
TextMenu.Item item_GhostStrawberry = CreatePrideSettingSlider(
"modoptions_PrideMod_GhostStrawberry",
settings.GhostStrawberry,
prideType => settings.GhostStrawberry = prideType
);
TextMenu.Item Item_GoldenStrawberry = CreatePrideSettingSlider(
TextMenu.Item item_GoldenStrawberry = CreatePrideSettingSlider(
"modoptions_PrideMod_GoldenStrawberry",
settings.GoldenStrawberry,
prideType => settings.GoldenStrawberry = prideType
);
TextMenu.Item Item_GhostGoldenStrawberry = CreatePrideSettingSlider(
TextMenu.Item item_GhostGoldenStrawberry = CreatePrideSettingSlider(
"modoptions_PrideMod_GhostGoldenStrawberry",
settings.GhostGoldenStrawberry,
prideType => settings.GhostGoldenStrawberry = prideType
);
TextMenu.Item Item_SilverStrawberry = CreatePrideSettingSlider(
TextMenu.Item item_SilverStrawberry = CreatePrideSettingSlider(
"modoptions_PrideMod_SilverStrawberry",
settings.SilverStrawberry,
prideType => settings.SilverStrawberry = prideType
);
TextMenu.Item Item_GhostSilverStrawberry = CreatePrideSettingSlider(
TextMenu.Item item_GhostSilverStrawberry = CreatePrideSettingSlider(
"modoptions_PrideMod_GhostSilverStrawberry",
settings.GhostSilverStrawberry,
prideType => settings.GhostSilverStrawberry = prideType
);

TextMenu.Item Item_SummitFlag = CreatePrideSettingSlider(

TextMenu.SubHeader header_Flags = CreateSubHeader("modoptions_PrideMod_header_Flags");
TextMenu.Item item_SummitFlag = CreatePrideSettingSlider(
"modoptions_PrideMod_SummitFlag",
settings.SummitFlag,
prideType => settings.SummitFlag = prideType
);
TextMenu.Item Item_FinalFlag = CreatePrideSettingSlider(
TextMenu.Item item_FinalFlag = CreatePrideSettingSlider(
"modoptions_PrideMod_FinalFlag",
settings.FinalFlag,
prideType => settings.FinalFlag = prideType
);

Item_ASideCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_ASideCrystalHeart_sub"));
Item_BSideCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_BSideCrystalHeart_sub"));
Item_CSideCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_CSideCrystalHeart_sub"));
Item_EmptyCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_EmptyCrystalHeart_sub"));
Item_GhostCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostCrystalHeart_sub"));
Item_Strawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_Strawberry_sub"));
Item_GhostStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostStrawberry_sub"));
Item_GoldenStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GoldenStrawberry_sub"));
Item_GhostGoldenStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostGoldenStrawberry_sub"));
Item_SilverStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_SilverStrawberry_sub"));
Item_GhostSilverStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostSilverStrawberry_sub"));
Item_SummitFlag .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_SummitFlag_sub"));
Item_FinalFlag .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_FinalFlag_sub"));

menu.Add(Item_ASideCrystalHeart);
menu.Add(Item_BSideCrystalHeart);
menu.Add(Item_CSideCrystalHeart);
menu.Add(Item_EmptyCrystalHeart);
menu.Add(Item_GhostCrystalHeart);
menu.Add(Item_Strawberry);
menu.Add(Item_GhostStrawberry);
menu.Add(Item_GoldenStrawberry);
menu.Add(Item_GhostGoldenStrawberry);

menu.Add(header_CrystalHearts);
menu.Add(item_ASideCrystalHeart);
menu.Add(item_BSideCrystalHeart);
menu.Add(item_CSideCrystalHeart);
menu.Add(item_EmptyCrystalHeart);
menu.Add(item_GhostCrystalHeart);

menu.Add(header_Strawberries);
menu.Add(item_Strawberry);
menu.Add(item_GhostStrawberry);
menu.Add(item_GoldenStrawberry);
menu.Add(item_GhostGoldenStrawberry);
if (PrideModModule.Instance.Loaded_CollabUtils2) {
menu.Add(Item_SilverStrawberry);
menu.Add(Item_GhostSilverStrawberry);
menu.Add(item_SilverStrawberry);
menu.Add(item_GhostSilverStrawberry);
}
menu.Add(Item_SummitFlag);
menu.Add(Item_FinalFlag);
}

menu.Add(header_Flags);
menu.Add(item_SummitFlag);
menu.Add(item_FinalFlag);


item_ASideCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_ASideCrystalHeart_sub"));
item_BSideCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_BSideCrystalHeart_sub"));
item_CSideCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_CSideCrystalHeart_sub"));
item_EmptyCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_EmptyCrystalHeart_sub"));
item_GhostCrystalHeart .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostCrystalHeart_sub"));
item_Strawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_Strawberry_sub"));
item_GhostStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostStrawberry_sub"));
item_GoldenStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GoldenStrawberry_sub"));
item_GhostGoldenStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostGoldenStrawberry_sub"));
item_SilverStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_SilverStrawberry_sub"));
item_GhostSilverStrawberry .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_GhostSilverStrawberry_sub"));
item_SummitFlag .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_SummitFlag_sub"));
item_FinalFlag .AddDescription(menu, Dialog.Clean("modoptions_PrideMod_FinalFlag_sub"));
}

private static TextMenu.Item CreatePrideSettingSlider(string settingName, PrideTypes value, Action<PrideTypes> action)
=> new TextMenu.Slider(
Dialog.Clean(settingName),
Expand All @@ -117,6 +129,9 @@ private static TextMenu.Item CreatePrideSettingSlider(string settingName, PrideT
(int)value
).Change(i => action((PrideTypes)i));

private static TextMenu.SubHeader CreateSubHeader(string header)
=> new(Dialog.Clean(header));

protected override void gotoMenu(Overworld overworld)
=> overworld.Goto<OuiPrideSettings>();
}
Expand Down
4 changes: 4 additions & 0 deletions Dialog/English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ modoptions_PrideMod_MinimalBloom_sub=Reduces the bloom level of reskinned hearts
modoptions_PrideMod_PrideSettings=Pride Settings
modoptions_PrideMod_PrideSettings_title=PRIDE SETTINGS

modoptions_PrideMod_header_CrystalHearts=Crystal Hearts
modoptions_PrideMod_header_Strawberries=Strawberries
modoptions_PrideMod_header_Flags=Flags

modoptions_PrideMod_ASideCrystalHeart=A-Side Crystal Heart
modoptions_PrideMod_ASideCrystalHeart_sub=The pride type for the A-Side crystal heart. Default uses the blue heart.

Expand Down

0 comments on commit 68b47ce

Please sign in to comment.