[Add] Menu with configs and size fix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user