fit : playable with controller
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using OctoCore.Navigation.Data;
|
||||
using OctoCore.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace OctoCore.Navigation
|
||||
{
|
||||
@@ -19,6 +21,9 @@ namespace OctoCore.Navigation
|
||||
[SerializeField, Tooltip("Optional panel to show/hide (options, credits...)")]
|
||||
private GameObject _optionalPanel;
|
||||
|
||||
[SerializeField] private Button _optionalPanelFirstButton;
|
||||
[SerializeField] private Button _mainPanelDefaultButton;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Hide optional panel on start if assigned
|
||||
@@ -71,5 +76,15 @@ namespace OctoCore.Navigation
|
||||
}
|
||||
|
||||
// --- Add your custom button methods below ---
|
||||
|
||||
public void SelectDebugFirstButton()
|
||||
{
|
||||
EventSystem.current.SetSelectedGameObject(_optionalPanelFirstButton.gameObject);
|
||||
}
|
||||
|
||||
public void SelectMainDefaultButton()
|
||||
{
|
||||
EventSystem.current.SetSelectedGameObject(_mainPanelDefaultButton.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user