add school
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Assets.Scripts.Interfaces;
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
@@ -24,10 +25,10 @@ public class DialogOptionsUI : MonoBehaviour
|
||||
private DialogTabUITemplate _dialogTabUI;
|
||||
|
||||
private DialogTabUITemplate _selectedTab;
|
||||
private JobItemUITemplate _selectedItem;
|
||||
private IDialogItemUI _selectedItem;
|
||||
private DialogSO _dialogSO;
|
||||
|
||||
public void ShowCategoriesDialog(DialogSO dialogSO, Action onCancel, Action<JobInfoSO> onConfirm)
|
||||
public void ShowCategoriesDialog(DialogSO dialogSO, Action onCancel, Action<IDialogOption> onConfirm)
|
||||
{
|
||||
GameManager.Instance.UI.Freeze();
|
||||
|
||||
@@ -78,7 +79,7 @@ public class DialogOptionsUI : MonoBehaviour
|
||||
{
|
||||
var itemUI = Instantiate(_dialogSO.UITemplate, _itemsContainer);
|
||||
itemUI.gameObject.SetActive(true);
|
||||
itemUI.GetComponent<JobItemUITemplate>().SetItem(this, job);
|
||||
itemUI.GetComponent<IDialogItemUI>().SetItem(this, job);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,9 +87,8 @@ public class DialogOptionsUI : MonoBehaviour
|
||||
{
|
||||
}
|
||||
|
||||
public void OnItemSelected(JobItemUITemplate button)
|
||||
public void OnItemSelected(IDialogItemUI button)
|
||||
{
|
||||
print($"selected job {button.Item.name}");
|
||||
_selectedItem = button;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user