|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
using Sirenix.OdinInspector;
|
|
using Sirenix.OdinInspector;
|
|
using KairoEngine.UI.InteractionHandler;
|
|
using KairoEngine.UI.InteractionHandler;
|
|
|
|
+using KairoEngine.Core;
|
|
|
|
|
|
namespace KairoEngine.UI.Encyclopedia
|
|
namespace KairoEngine.UI.Encyclopedia
|
|
{
|
|
{
|
|
@@ -51,6 +52,17 @@ namespace KairoEngine.UI.Encyclopedia
|
|
public void Navigate()
|
|
public void Navigate()
|
|
{
|
|
{
|
|
if(encyclopediaUi != null) encyclopediaUi.Navigate();
|
|
if(encyclopediaUi != null) encyclopediaUi.Navigate();
|
|
|
|
+ GenericEvents.Trigger("OpeningEncyclopediaArticle", menuIndex, subMenuIndex);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public EncyclopediaCategory GetCategory(int categoryIndex) => categories[categoryIndex];
|
|
|
|
+
|
|
|
|
+ public EncyclopediaArticle GetArticle(int categoryIndex, int articleIndex)
|
|
|
|
+ {
|
|
|
|
+ var category = categories[categoryIndex];
|
|
|
|
+ var articles = category.GetArticles();
|
|
|
|
+ if(articleIndex < articles.Count) return articles[articleIndex];
|
|
|
|
+ else return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|