added simple UI

This commit is contained in:
Mausham
2026-05-27 15:05:26 +05:45
parent 442836ad89
commit d51ec3eaa7
2508 changed files with 305760 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 99f56c35c78a8df4c864137f645cb7fa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
{
"name": "Features.Mainmenu",
"rootNamespace": "Darkmatter.Features.Mainmenu",
"references": [
"GUID:6a0a834eb41764f12ba55c3fb04a40cb",
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1",
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
"GUID:68765d262e2128e4ab49c983f3411946"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 24689bdd721a690468786e8d3718a343
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 897e6d60e776fc648870bdd8e37d1bf0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using Darkmatter.Libs.Installers;
using UnityEngine;
using VContainer;
using VContainer.Unity;
namespace Darkmatter.Features.Mainmenu
{
public class MainmenuServiceModule: MonoBehaviour, IServiceModule
{
[SerializeField] private MainmenuView mainmenuView;
public void Register(IContainerBuilder builder)
{
if(mainmenuView!= null)
{
builder.RegisterEntryPoint<MainmenuPresenter>().WithParameter(mainmenuView);
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 11551a88f8a7aed4ea3d9b1333736a95

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b253e003d7c03b74e8a92292c3597830
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using System;
using UnityEngine;
using VContainer.Unity;
namespace Darkmatter.Features.Mainmenu
{
public class MainmenuPresenter : IStartable, IDisposable
{
private readonly MainmenuView _view;
public MainmenuPresenter(MainmenuView view)
{
_view = view;
}
public void Start()
{
_view.OnPlayBtnClickedEvent += OnPlayBtnClicked;
}
private void OnPlayBtnClicked()
{
Debug.Log("Play Btn Clicked");
}
public void Dispose()
{
_view.OnPlayBtnClickedEvent -= OnPlayBtnClicked;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8133519fbded9f44e8500998f6f84a9d

View File

@@ -0,0 +1,21 @@
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Darkmatter.Features.Mainmenu
{
public class MainmenuView : MonoBehaviour
{
[SerializeField] private Button playBtn;
public event Action OnPlayBtnClickedEvent;
private void Start()
{
playBtn.onClick.AddListener(OnPlayBtnClicked);
}
private void OnPlayBtnClicked()
{
OnPlayBtnClickedEvent?.Invoke();
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b2e90f858cdbce54abda9b9150c05a27