[Add] Menu with configs and size fix

This commit is contained in:
2026-06-06 23:48:55 +07:00
parent 7104089c00
commit a9767c5301
29 changed files with 453 additions and 153 deletions
@@ -11,6 +11,7 @@ namespace Minesweeper.Presentation.Factories
{
private const string ContentImagePath = "Content/Image";
private const string ContentLabelPath = "Content/Text (TMP)";
private const string ContentPath = "Content";
private readonly MinesweeperUiConfig uiConfig;
@@ -33,9 +34,10 @@ namespace Minesweeper.Presentation.Factories
var button = go.GetComponent<Button>();
var backgroundImage = go.GetComponent<Image>();
var contentRoot = FindComponent<RectTransform>(go.transform, ContentPath);
var contentImage = FindComponent<Image>(go.transform, ContentImagePath);
var label = FindComponent<TMP_Text>(go.transform, ContentLabelPath);
view.Bind(button, backgroundImage, contentImage, label);
view.Bind(button, backgroundImage, contentRoot, contentImage, label);
view.AutoBind();
view.Initialize(cell.X, cell.Y);
return view;
@@ -12,7 +12,6 @@ namespace Minesweeper.Presentation.Factories
private const string BoardGridName = "BoardGrid";
private const string PausePanelName = "PausePanel";
private const string ResultPanelName = "ResultPanel";
private const string StartButtonPath = "StartButton";
private const string RestartButtonPath = "RestartButton";
private const string ContinueButtonPath = "ContinueButton";
private const string MainMenuButtonPath = "MainMenuButton";
@@ -40,7 +39,7 @@ namespace Minesweeper.Presentation.Factories
var result = SpawnScreen(catalog.ResultPanelPrefab, contentRoot, ResultPanelName, 3);
var mainMenuView = RequireComponent<MainMenuView>(mainMenu.transform, MainMenuPanelName);
mainMenuView.Bind(mainMenu, RequireChildComponent<Button>(mainMenu.transform, StartButtonPath));
mainMenuView.BindRoot(mainMenu);
var refs = new MinesweeperScreenRefs(
mainMenuView,