This package has been marked as deprecated, and it's suggested another
alternative is used.
You are viewing a potentially older version of this package.
View all versions.
TrombSettings
Allows modders to show BepInEx config entries ingame
Date uploaded | a year ago |
Version | 1.0.1 |
Download link | emmett-TrombSettings-1.0.1.zip |
Downloads | 3328 |
Dependency string | emmett-TrombSettings-1.0.1 |
This mod requires the following mods to function
BepInEx-BepInExPack_TromboneChamp
BepInEx pack for Trombone Champ. Preconfigured and ready to use.
Preferred version: 5.4.21README
TrombSettings
Allows modders to show BepInEx config entries ingame
For Modders
Example from the Highscore Accuracy mod
public enum AccType
{
BaseGame,
Real
}
internal static ConfigEntry<AccType> accType;
internal static ConfigEntry<bool> showLetterRank;
internal static ConfigEntry<int> decimals;
internal static ConfigEntry<bool> showAccIngame;
internal static ConfigEntry<bool> showPBIngame;
private void Awake()
{
Instance = this;
// Start by binding to the BepInEx config.
accType = Config.Bind("General", "Acc Type", AccType.BaseGame);
showLetterRank = Config.Bind("General", "Show Letters", true);
decimals = Config.Bind("General", "Decimal Places", 2);
showAccIngame = Config.Bind("General", "Show acc in track", true);
showPBIngame = Config.Bind("General", "Show PB in track", true);
// Creates a new settings page
TrombEntryList settings = TrombConfig.TrombSettings["Highscore Acc"];
// Adds the config entries
// Ordered from first to last added entry
settings.Add(showLetterRank);
// Enums are shown as dropdowns
settings.Add(accType);
// For number values use the StepSliderConfig class
//StepSliderConfig(min, max, increment, integerOnly, the numerical config entry)
settings.Add(new StepSliderConfig(0, 4, 1, true, decimals));
settings.Add(showAccIngame);
settings.Add(showPBIngame);
}