init: add project

This commit is contained in:
Bragin Stepan
2026-02-18 23:02:28 +05:00
commit 4f01e66894
620 changed files with 52253 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System.Collections.Generic;
using _Project.Develop.Runtime.UI.Core;
using UnityEngine;
namespace _Project.Develop.Runtime.UI.Common
{
public class ElementsListView<TElement> : MonoBehaviour, IView where TElement : MonoBehaviour, IView
{
[SerializeField] private Transform _parent;
private List<TElement> _elements = new();
public IReadOnlyList<TElement> Elements => _elements;
public void Add(TElement element)
{
element.transform.SetParent(_parent);
_elements.Add(element);
}
public void Remove(TElement element)
{
element.transform.SetParent(null);
_elements.Remove(element);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 02b00825f490449690f1efdc31ede4e4
timeCreated: 1771176950

View File

@@ -0,0 +1,6 @@
namespace _Project.Develop.Runtime.UI.Common
{
public class IconTextListView : ElementsListView<IconTextView>
{
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cf2c40f7b2744ebeb706010ab50a1a3d
timeCreated: 1771176950

View File

@@ -0,0 +1,17 @@
using _Project.Develop.Runtime.UI.Core;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace _Project.Develop.Runtime.UI.Common
{
public class IconTextView : MonoBehaviour, IView
{
[SerializeField] private TMP_Text _text;
[SerializeField] private Image _icon;
public void SetText(string text) => _text.text = text;
public void SetIcon(Sprite icon) => _icon.sprite = icon;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 066c31a029034b4399c6e94b9b71e2bf
timeCreated: 1771176950