added documentation, fixed some bugs

This commit is contained in:
Sebastian Bularca
2026-04-06 17:30:09 +02:00
parent 333539eb0e
commit f42885830a
67 changed files with 1963 additions and 151 deletions

View File

@@ -3,6 +3,10 @@ using System.Collections.Generic;
using UnityEngine;
namespace Jovian.PopupSystem {
/// <summary>
/// ScriptableObject holding all popup system configuration. Create via
/// Assets > Create > Jovian > Popup System > Popup Settings.
/// </summary>
[CreateAssetMenu(fileName = "PopupSettings", menuName = "Jovian/Popup System/Popup Settings")]
public class PopupSettings : ScriptableObject {
[Header("General")]
@@ -26,6 +30,9 @@ namespace Jovian.PopupSystem {
[Header("Per-Category Overrides")]
public List<CategoryDelay> categoryDelayOverrides = new();
/// <summary>
/// Returns the configured priority for a category, or 0 if not configured.
/// </summary>
public int GetPriority(PopupCategory category) {
foreach(var cp in categoryPriorities) {
if(cp.category == category) {
@@ -35,6 +42,9 @@ namespace Jovian.PopupSystem {
return 0;
}
/// <summary>
/// Returns the configured delay override for a category, or the default popupDelay.
/// </summary>
public float GetDelay(PopupCategory category) {
foreach(var cd in categoryDelayOverrides) {
if(cd.category == category) {