public override void Load() { switchSkinButton = Courier.UI.RegisterMultipleModOptionButton(() => "Switch Skin", null, ChangeSkin, GetSkinIndex, GetTextForSkinIndex); rainbowModeButton = Courier.UI.RegisterToggleModOptionButton(() => "Rainbow Mode", OnRainbowModeToggle, (b) => rainbowMode); rainbowSpeedButton = Courier.UI.RegisterTextEntryModOptionButton(() => "Rainbow Speed", OnRainbowSpeedEntry, 3, null, () => rainbowSpeedMultiplier.ToString(), TextEntryButtonInfo.CharsetFlags.Dot | TextEntryButtonInfo.CharsetFlags.Number); switchSkinButton.IsEnabled = () => Manager <LevelManager> .Instance.GetCurrentLevelEnum() != ELevel.NONE; Courier.Events.PlayerController.OnUpdate += PlayerController_OnUpdate; }
int GetSkinIndex(MultipleOptionButtonInfo buttonInfo) { return((int)Manager <SkinManager> .Instance.CurrentSkinID); }