40 lines
796 B
C#
40 lines
796 B
C#
using System;
|
|
using Michsky.UI.Heat;
|
|
using Obvious.Soap;
|
|
using UnityEngine;
|
|
|
|
public class UI_ShopTopBar : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private InputFieldManager _SearchField;
|
|
|
|
[SerializeField]
|
|
private ButtonManager _SearchButton;
|
|
|
|
[SerializeField]
|
|
private Dropdown _SortDropdown;
|
|
|
|
[SerializeField]
|
|
private StringVariable _Shop_Search;
|
|
|
|
[SerializeField]
|
|
private IntVariable _Shop_Sort;
|
|
|
|
public void OnSearchFieldSubmit()
|
|
{
|
|
_Shop_Search.Value = _SearchField.inputText.text;
|
|
}
|
|
|
|
public void OnSearchButtonClick()
|
|
{
|
|
_Shop_Search.Value = _SearchField.inputText.text;
|
|
}
|
|
|
|
public void OnSortDropdownValueChanged()
|
|
{
|
|
int num = Enum.GetNames(typeof(ItemSortMethod)).Length;
|
|
int value = Mathf.Clamp(_SortDropdown.selectedItemIndex, 0, num - 1);
|
|
_Shop_Sort.Value = value;
|
|
}
|
|
}
|