Move ruleset config to main scene. Add title for UI.
This commit is contained in:
@@ -7,7 +7,7 @@ using UnityEngine.UI;
|
||||
namespace Cryville.Crtr.Config {
|
||||
public class InputConfigPanel : MonoBehaviour {
|
||||
[SerializeField]
|
||||
ConfigScene m_configScene;
|
||||
ConfigPanelMaster m_configScene;
|
||||
|
||||
[SerializeField]
|
||||
GameObject m_inputDialog;
|
||||
@@ -24,7 +24,7 @@ namespace Cryville.Crtr.Config {
|
||||
[SerializeField]
|
||||
GameObject m_prefabInputConfigEntry;
|
||||
|
||||
readonly SimpleInputConsumer _consumer = new SimpleInputConsumer(Game.InputManager);
|
||||
SimpleInputConsumer _consumer;
|
||||
public InputProxy proxy;
|
||||
readonly Dictionary<string, InputConfigPanelEntry> _entries = new Dictionary<string, InputConfigPanelEntry>();
|
||||
|
||||
@@ -50,7 +50,10 @@ namespace Cryville.Crtr.Config {
|
||||
CloseDialog();
|
||||
}
|
||||
|
||||
void Start() {
|
||||
public void OnConfigEnable() {
|
||||
CallHelper.Purge(m_entryList);
|
||||
_entries.Clear();
|
||||
_consumer = new SimpleInputConsumer(Game.InputManager);
|
||||
_consumer.Activate();
|
||||
foreach (var i in m_configScene.ruleset.Root.inputs) {
|
||||
var e = GameObject.Instantiate(m_prefabInputConfigEntry, m_entryList.transform).GetComponent<InputConfigPanelEntry>();
|
||||
@@ -61,7 +64,7 @@ namespace Cryville.Crtr.Config {
|
||||
proxy.ProxyChanged += OnProxyChanged;
|
||||
}
|
||||
|
||||
void OnDestroy() {
|
||||
public void OnConfigDisable() {
|
||||
_consumer.Deactivate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user