client: DeckBuilder — фиксированная правая панель и адаптивная сетка
CI / test (push) Successful in 1m55s
Details
CI / test (push) Successful in 1m55s
Details
- Правая панель сокращена до 420 px и больше не растягивается (childForceExpandWidth = false). - Коллекция занимает всё свободное место; число колонок считается по ширине, карточки не обрезаются справа. - Проверки: EditMode 69/69, standalone собран.
This commit is contained in:
parent
874ec6aa1a
commit
13654ce134
|
|
@ -19,7 +19,7 @@ namespace Vanguard.UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class DeckBuilderView
|
public sealed class DeckBuilderView
|
||||||
{
|
{
|
||||||
private const float PanelWidth = 380f;
|
private const float PanelWidth = 420f;
|
||||||
private const float RowHeight = 92f;
|
private const float RowHeight = 92f;
|
||||||
|
|
||||||
private static readonly Color TextPrimary = new Color(0.88f, 0.93f, 1f);
|
private static readonly Color TextPrimary = new Color(0.88f, 0.93f, 1f);
|
||||||
|
|
@ -177,6 +177,9 @@ namespace Vanguard.UI
|
||||||
body.offsetMin = new Vector2(34f, 24f);
|
body.offsetMin = new Vector2(34f, 24f);
|
||||||
body.offsetMax = new Vector2(-34f, -120f);
|
body.offsetMax = new Vector2(-34f, -120f);
|
||||||
UiKit.AddHorizontalLayout(body, 0, 14);
|
UiKit.AddHorizontalLayout(body, 0, 14);
|
||||||
|
var bodyLayout = body.GetComponent<HorizontalLayoutGroup>();
|
||||||
|
if (bodyLayout != null)
|
||||||
|
bodyLayout.childForceExpandWidth = false;
|
||||||
|
|
||||||
var collectionArea = UiKit.CreatePanel(
|
var collectionArea = UiKit.CreatePanel(
|
||||||
body, "CollectionArea", new Color(0.04f, 0.06f, 0.10f, 0.55f));
|
body, "CollectionArea", new Color(0.04f, 0.06f, 0.10f, 0.55f));
|
||||||
|
|
@ -213,11 +216,7 @@ namespace Vanguard.UI
|
||||||
|
|
||||||
var grid = _collectionContent.GetComponent<GridLayoutGroup>();
|
var grid = _collectionContent.GetComponent<GridLayoutGroup>();
|
||||||
if (grid != null)
|
if (grid != null)
|
||||||
{
|
|
||||||
grid.constraint = GridLayoutGroup.Constraint.FixedColumnCount;
|
|
||||||
grid.constraintCount = 6;
|
|
||||||
grid.childAlignment = TextAnchor.UpperLeft;
|
grid.childAlignment = TextAnchor.UpperLeft;
|
||||||
}
|
|
||||||
|
|
||||||
_status = UiKit.CreateText(
|
_status = UiKit.CreateText(
|
||||||
collectionArea, "Status", string.Empty, 15,
|
collectionArea, "Status", string.Empty, 15,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue