Пример #1
0
    public void Btn_OnItemTypeOpen()
    {
        var labels = EnumUtils.ToStringArray <EquipmentType>();

        for (int i = 0; i < labels.Length; i++)
        {
            if (labels[i] == "None")
            {
                labels[i] = "All";
            }
        }

        ConfirmFilter.Ask("Item Type", null, labels)
        .Then(answer => {
            Debug.Log("Answer is: " + answer);

            if (answer == "All")
            {
                _EquipType = EquipmentType.None;
            }
            else
            {
                _EquipType = answer.AsEnum <EquipmentType>();
            }

            UpdateItemTypeLabel();
            RefreshItems();
        });
    }
Пример #2
0
    public void Btn_OnFilterTypeOpen()
    {
        var labels = EnumUtils.ToStringArray <ItemFilterType>();

        ConfirmFilter.Ask("Item Filter", null, labels)
        .Then(answer => {
            Debug.Log("Answer is: " + answer);

            _ITEM_FILTER_TYPE = answer.AsEnum <ItemFilterType>();

            UpdateFilterLabel();
            RefreshItems();
        });
    }