Skip to content

Commit fb44157

Browse files
committed
Layout
1 parent 16c5370 commit fb44157

File tree

5 files changed

+67
-4
lines changed

5 files changed

+67
-4
lines changed

Assets/Prefabs/Components/Card Searchbar Variant.prefab

Lines changed: 34 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
using UnityEngine;
6+
7+
namespace Cgs.UI
8+
{
9+
public class SearchbarLayout : MonoBehaviour
10+
{
11+
public RectTransform filterButton;
12+
13+
private void OnRectTransformDimensionsChange()
14+
{
15+
if (!gameObject.activeInHierarchy || filterButton == null)
16+
return;
17+
18+
filterButton.anchoredPosition = Vector2.zero;
19+
}
20+
}
21+
}

Assets/Scripts/Cgs/UI/SearchbarLayout.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Cgs/UI/SelectionPanel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected void Rebuild<TKey, TValue>(IDictionary<TKey, TValue> options, OnSelect
5555
if (toggleGroup != null)
5656
toggleGroup.allowSwitchOff = AllowSwitchOff;
5757

58-
if (!AllowSwitchOff)
58+
if (!AllowSwitchOff && currentSelectionIndex >= 0 && currentSelectionIndex < Toggles.Count)
5959
Toggles[currentSelectionIndex].isOn = true;
6060

6161
if (emptyText == null)

docs/pages/roadmap.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Unity Data.vcxitems
1616
<DeploymentContent>true</DeploymentContent>
1717
<ExcludeFromResourceIndex>true</ExcludeFromResourceIndex>
1818
</None>
19-
- filter box in doesn't scale to right loc
2019

2120
## Active Sprint
2221
- Bug: Sometimes stacks will duplicate the bottom two cards below the stack, creating another stack underneath

0 commit comments

Comments
 (0)