Example #1
0
                //-----------------------------------------------------------------------------
                // Methods
                //-----------------------------------------------------------------------------

                public TextureIconContainer(IconType type)
                {
                    this.selected   = null;
                    this.unSelected = null;
                    switch (type)
                    {
                    case IconType.File:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_File_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_File.psd");
                        break;

                    case IconType.Assets:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_Assets_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_Assets.psd");
                        break;

                    case IconType.GameObject:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_GameObject_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_GameObject.psd");
                        break;

                    case IconType.Component:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_Component_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_Component.psd");
                        break;

                    case IconType.Window:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_Window_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_Window.psd");
                        break;

                    case IconType.Helper:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_Helper_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_Helper.psd");
                        break;

                    case IconType.PingAsset:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_PingAsset_Selected.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_PingAsset.psd");
                        break;

                    case IconType.Unknown:
                    default:
                        this.selected   = StyleTextureWrapper.LoadCustomIcon("Spotlight_Unity.psd");
                        this.unSelected = StyleTextureWrapper.LoadCustomIcon("Spotlight_Unity.psd");
                        break;
                    }

                    // Error Material
                    if (this.selected == null)
                    {
                        this.selected = StyleTextureWrapper.MakeTex(30, 30, Color.red, new RectOffset(0, 0, 0, 0), Color.red);
                        Debug.LogError("Can't Load Selected Icon for " + type);
                    }

                    if (this.unSelected == null)
                    {
                        this.unSelected = StyleTextureWrapper.MakeTex(30, 30, Color.red, new RectOffset(0, 0, 0, 0), Color.red);
                        Debug.LogError("Can't Load Unselected Icon for " + type);
                    }
                }