Beispiel #1
0
 public void SetColor(ColorBar.ColorType type)
 {
     if (image)
     {
         colorType   = type;
         image.color = ColorBar.Instance.GetColor(type);
     }
 }
Beispiel #2
0
    // ========================================= UNITY FUNCS =========================================
    public void SetColor(ColorBar.ColorType type)
    {
        if (image)
        {
            colorType   = type;
            image.color = ColorBar.Instance.GetColor(colorType);

            // save index info (color)
            if (this is CommonPanel)
            {
                DataMgr.Instance.SaveIndexData(this as CommonPanel);
            }
        }
    }
Beispiel #3
0
    // ===== INDEX DATA =====
    public void SaveIndexData(Panel panel)
    {
        string key = panel.GetTitle();

        ColorBar.ColorType colorType = panel.GetColorType();

        DataIndex newData = new DataIndex(key, (int)colorType);

        // replace already have data
        if (dataIndexer.IsContain(key))
        {
            dataIndexer.ReplaceIndex(newData);
        }
        // add new data
        else
        {
            dataIndexer.AddIndex(newData);
        }
    }
Beispiel #4
0
 public void SetColorIndex(ColorBar.ColorType type)
 {
     colorId = (int)type;
 }