public void SetColor(ColorBar.ColorType type) { if (image) { colorType = type; image.color = ColorBar.Instance.GetColor(type); } }
// ========================================= 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); } } }
// ===== 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); } }
public void SetColorIndex(ColorBar.ColorType type) { colorId = (int)type; }