Exemplo n.º 1
0
    void recalc_sortables()
    {
        bool first = true;

        foreach (var QI in queue.queue)
        {
            if (QI.getType() != 0)
            {
                continue;
            }
            if (first)
            {
                first     = false;
                sortables = new List <string>(QI.getNumericalKeys());
                continue;
            }
            List <string> intermed = new List <string>(sortables);
            foreach (var s in intermed)
            {
                if (!QI.hasNumericalKey(s))
                {
                    sortables.Remove(s);
                }
            }
        }

        string x = "";

        foreach (var k in sortables)
        {
            x += k + " , ";
        }
        Debug.Log(x);


        sortBy.options.Clear();
        sortBy.RefreshShownValue();
        foreach (var k in sortables)
        {
            sortBy.options.Add(new Dropdown.OptionData(k));
        }
        sortBy.RefreshShownValue();
    }