-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mods menu * mod config UI * menu controller support
- Loading branch information
1 parent
79944ff
commit 2468d6d
Showing
50 changed files
with
1,321 additions
and
134 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
using System.Collections.Generic; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace OWML.Common | ||
{ | ||
public interface IModConfig | ||
{ | ||
bool Enabled { get; } | ||
bool RequireVR { get; } | ||
Dictionary<string, object> Settings { get; } | ||
bool Enabled { get; set; } | ||
bool RequireVR { get; set; } | ||
Dictionary<string, object> Settings { get; set; } | ||
T GetSettingsValue<T>(string key); | ||
void SetSettingsValue(string key, object value); | ||
|
||
[Obsolete("Use GetSettingsValue instead")] | ||
T GetSetting<T>(string key); | ||
} | ||
} |
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,10 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModConfigMenu : IModPopupMenu | ||
{ | ||
IModData ModData { get; } | ||
IModBehaviour Mod { get; } | ||
|
||
void Initialize(Menu modMenuCopy, IModToggleInput toggleTemplate, IModSliderInput sliderTemplate, IModTextInput textInputTemplate, IModNumberInput numberInputTemplate); | ||
} | ||
} |
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,17 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInput<T> | ||
{ | ||
event Action<T> OnChange; | ||
T Value { get; set; } | ||
MonoBehaviour Element { get; } | ||
string Title { get; set; } | ||
int Index { get; set; } | ||
void Show(); | ||
void Hide(); | ||
void Initialize(IModMenu menu); | ||
} | ||
} |
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,12 @@ | ||
using System; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInputMenu : IModMenu | ||
{ | ||
event Action<string> OnConfirm; | ||
event Action OnCancel; | ||
void Initialize(PopupInputMenu inputMenu); | ||
void Open(InputType inputType, string value); | ||
} | ||
} |
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,8 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModNumberInput : IModInput<float> | ||
{ | ||
IModNumberInput Copy(); | ||
IModNumberInput Copy(string key); | ||
} | ||
} |
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,11 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModSliderInput : IModInput<float> | ||
{ | ||
float Min { get; set; } | ||
float Max { get; set; } | ||
|
||
IModSliderInput Copy(); | ||
IModSliderInput Copy(string title); | ||
} | ||
} |
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,8 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModTextInput : IModInput<string> | ||
{ | ||
IModTextInput Copy(); | ||
IModTextInput Copy(string key); | ||
} | ||
} |
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,11 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModToggleInput : IModInput<bool> | ||
{ | ||
TwoButtonToggleElement Toggle { get; } | ||
IModButton YesButton { get; } | ||
IModButton NoButton { get; } | ||
IModToggleInput Copy(); | ||
IModToggleInput Copy(string key); | ||
} | ||
} |
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,10 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModsMenu : IModPopupMenu | ||
{ | ||
void AddMod(IModData modData, IModBehaviour mod); | ||
IModConfigMenu GetModMenu(IModBehaviour modBehaviour); | ||
void Initialize(IModMainMenu mainMenu); | ||
void Initialize(IModPauseMenu pauseMenu); | ||
} | ||
} |
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,9 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public enum InputType | ||
{ | ||
Text = 0, | ||
Number = 1 | ||
}; | ||
|
||
} |
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
Oops, something went wrong.