-
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.
Merge pull request #174 from amazingalek/dev
* Improved combination input UI * OWML config menu * Mod dependency fixes * Fixes to menus and input
- Loading branch information
Showing
100 changed files
with
2,496 additions
and
1,053 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
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
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,26 @@ | ||
using System; | ||
using UnityEngine.UI; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModButtonBase | ||
{ | ||
event Action OnClick; | ||
int Index { get; set; } | ||
Button Button { get; } | ||
bool IsSelected { get; } | ||
void Initialize(IModMenu menu); | ||
|
||
IModButtonBase Copy(); | ||
IModButtonBase Copy(int index); | ||
|
||
IModButtonBase Duplicate(); | ||
IModButtonBase Duplicate(int index); | ||
|
||
IModButtonBase Replace(); | ||
IModButtonBase Replace(int index); | ||
|
||
void Show(); | ||
void Hide(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModConfigMenu : IModPopupMenu | ||
public interface IModConfigMenu : IModConfigMenuBase | ||
{ | ||
IModData ModData { get; } | ||
IModBehaviour Mod { get; } | ||
|
||
void Initialize(Menu modMenuCopy, IModToggleInput toggleTemplate, IModSliderInput sliderTemplate, IModTextInput textInputTemplate, IModNumberInput numberInputTemplate, IModComboInput comboInputTemplate); | ||
} | ||
} |
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 IModConfigMenuBase : IModPopupMenu | ||
{ | ||
IModManifest Manifest { get; } | ||
|
||
void Initialize(Menu modMenuCopy, IModToggleInput toggleTemplate, IModSliderInput sliderTemplate, | ||
IModTextInput textInputTemplate, IModNumberInput numberInputTemplate, IModComboInput comboInputTemplate); | ||
} | ||
} |
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,7 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModFieldInput<T> : IModInput<T> | ||
{ | ||
IModButton Button { get; } | ||
} | ||
} |
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,17 +1,10 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInput<T> | ||
public interface IModInput<T> : IModInputBase | ||
{ | ||
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,15 @@ | ||
using UnityEngine; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInputBase | ||
{ | ||
MonoBehaviour Element { get; } | ||
string Title { get; set; } | ||
int Index { get; set; } | ||
bool IsSelected { get; } | ||
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,10 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInputCombinationElement : IModToggleInput | ||
{ | ||
IModLayoutManager Layout { get; } | ||
void Destroy(); | ||
void DestroySelf(); | ||
new IModInputCombinationElement Copy(string combination); | ||
} | ||
} |
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,14 @@ | ||
using System; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInputCombinationElementMenu : IModMenu | ||
{ | ||
event Action<string> OnConfirm; | ||
event Action OnCancel; | ||
|
||
void Initialize(PopupInputMenu menu); | ||
void Open(string value, string comboName, IModInputCombinationMenu combinationMenu = null, | ||
IModInputCombinationElement element = null); | ||
} | ||
} |
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 System.Collections.Generic; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModInputCombinationMenu : IModPopupMenu | ||
{ | ||
event Action<string> OnConfirm; | ||
event Action OnCancel; | ||
|
||
List<IModInputCombinationElement> CombinationElements { get; } | ||
string GenerateCombination(); | ||
void FillMenu(string combination); | ||
void Initialize(Menu menu, IModInputCombinationElement combinationElementTemplate); | ||
void RemoveCombinationElement(IModInputCombinationElement element); | ||
} | ||
} |
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,33 +1,7 @@ | ||
using System; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModLayoutButton | ||
public interface IModLayoutButton : IModButtonBase | ||
{ | ||
event Action OnClick; | ||
HorizontalLayoutGroup LayoutGroup { get; } | ||
int Index { get; set; } | ||
Button Button { get; } | ||
void UpdateState(); | ||
void Initialize(IModMenu menu); | ||
|
||
IModLayoutButton Copy(); | ||
IModLayoutButton Copy(int index); | ||
|
||
IModLayoutButton Duplicate(); | ||
IModLayoutButton Duplicate(int index); | ||
|
||
IModLayoutButton Replace(); | ||
IModLayoutButton Replace(int index); | ||
|
||
void Show(); | ||
void Hide(); | ||
|
||
void SetControllerCommand(SingleAxisCommand inputCommand); | ||
|
||
void AddText(string text); | ||
void AddPicture(Texture2D texture, float scale = 1.0f); | ||
IModLayoutManager Layout { get; } | ||
} | ||
} |
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,18 @@ | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModLayoutManager | ||
{ | ||
LayoutGroup LayoutGroup { get; } | ||
int ChildCount { get; } | ||
|
||
void UpdateState(); | ||
void Clear(); | ||
void AddText(string text); | ||
void AddTextAt(string text, int index); | ||
void AddPicture(Texture2D texture, float scale = 1.0f); | ||
void AddPictureAt(Texture2D texture, int index, float scale = 1.0f); | ||
} | ||
} |
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,9 @@ | ||
using System; | ||
|
||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModMenuWithSelectables : IModPopupMenu | ||
{ | ||
event Action OnCancel; | ||
} | ||
} |
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,9 @@ | ||
namespace OWML.Common.Menus | ||
{ | ||
public interface IModOWMenu : IModMenu | ||
{ | ||
IModTabbedMenu OptionsMenu { get; } | ||
IModButton OptionsButton { get; } | ||
IModButton QuitButton { get; } | ||
} | ||
} |
Oops, something went wrong.