public void OnLayoutRebuilt(IXmlLayout layout)
        {
            this.layout = layout;
            template    = layout.GetElementById("row-template").GameObject;
            var spinner = layout.GetElementById <SpinnerScript>("overload-spinner");

            elements = new Dictionary <string, XElement>();
            spinner.Values.Clear();
            foreach (var el in _xml.DescendantsAndSelf())
            {
                string name = el.Name.LocalName;
                if (spinner.Values.Contains(name))
                {
                    int i = 2;
                    while (spinner.Values.Contains(name + " " + i))
                    {
                        i++;
                    }
                    name = name + " " + i;
                }
                elements.Add(name, el);
                spinner.Values.Add(name);
            }
            spinner.Value           = _xml.Name.LocalName;
            spinner.OnValueChanged += OnSpinnerChange;
            rows.Clear();
            OnSpinnerChange(_xml.Name.LocalName);
        }
Example #2
0
 public void OnLayoutRebuilt(IXmlLayout xmlLayout)
 {
     XmlLayout    = xmlLayout;
     ButtonObject = xmlLayout.GetElementById <XmlElement> ("ColorPickerButton");
 }
Example #3
0
 public void OnLayoutRebuilt(IXmlLayout xmlLayout)
 {
     XmlLayout    = xmlLayout;
     ButtonObject = xmlLayout.GetElementById("overload-button").GameObject;
 }