-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ModdingPink/master
- Loading branch information
Showing
9 changed files
with
139 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using SongRankedBadge.Configuration; | ||
using SongRankedBadge.UI; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Zenject; | ||
|
||
namespace SongRankedBadge.Installers | ||
{ | ||
class MenuInstaller : Installer | ||
{ | ||
public override void InstallBindings() | ||
{ | ||
if (!PluginConfig.Instance.SettingsMenuButton) | ||
Container.BindInterfacesTo<ModSettings>().FromNewComponentOnRoot().AsSingle(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
using BeatSaberMarkupLanguage.Attributes; | ||
using BeatSaberMarkupLanguage.MenuButtons; | ||
using BeatSaberMarkupLanguage.Settings; | ||
using SongRankedBadge.Configuration; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
using Zenject; | ||
|
||
namespace SongRankedBadge.UI | ||
{ | ||
public class ModSettings : MonoBehaviour, IInitializable, INotifyPropertyChanged | ||
{ | ||
private static PluginConfig Config => PluginConfig.Instance; | ||
private GameplaySetupViewController? gameplaySetupViewController; | ||
public event PropertyChangedEventHandler PropertyChanged = null!; | ||
|
||
[UIValue("ModEnable")] | ||
private bool ModEnable | ||
{ | ||
get => Config.ModEnable; | ||
set => Config.ModEnable = value; | ||
} | ||
|
||
[UIValue("DiffText")] | ||
public bool DiffText | ||
{ | ||
get => Config.DifferentText; | ||
set => Config.DifferentText = value; | ||
} | ||
|
||
[UIValue("DiffColor")] | ||
public bool DiffColor | ||
{ | ||
get => Config.DifferentColor; | ||
set => Config.DifferentColor = value; | ||
} | ||
|
||
[UIValue("MenuSettings")] | ||
public bool MenuSettings | ||
{ | ||
get => Config.SettingsMenuButton; | ||
set { | ||
Config.SettingsMenuButton = value; | ||
|
||
if(value) | ||
MenuButtons.Instance.RegisterButton(Plugin.Instance.MenuButton); | ||
else | ||
MenuButtons.Instance.UnregisterButton(Plugin.Instance.MenuButton); | ||
} | ||
} | ||
|
||
public void Initialize() | ||
{ | ||
BSMLSettings.Instance.AddSettingsMenu("Ranked Badge", "SongRankedBadge.UI.configMenu.bsml", this); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters