Beispiel #1
0
        public void OnSkinRefreshed(UISkin skin, bool isInitialized = true)
        {
            this.skin = skin;

            TransformComponent.sizeDelta = new Vector2(TransformComponent.sizeDelta.x, skin.FileHeight);
            skin.ApplyTo(nameText, isSelected ? skin.FileSelectedTextColor : skin.FileNormalTextColor);
            icon.rectTransform.sizeDelta = new Vector2(icon.rectTransform.sizeDelta.x, -skin.FileIconsPadding);

            if (isInitialized)
            {
                SetSelected(isSelected);
            }
        }
Beispiel #2
0
        internal void RefreshSkin(UISkin skin)
        {
            rectTransform.GetComponent <Image>().color = skin.ContextMenuBackgroundColor;

            deselectAllButton.image.color  = skin.ContextMenuBackgroundColor;
            selectAllButton.image.color    = skin.ContextMenuBackgroundColor;
            createFolderButton.image.color = skin.ContextMenuBackgroundColor;
            deleteButton.image.color       = skin.ContextMenuBackgroundColor;
            renameButton.image.color       = skin.ContextMenuBackgroundColor;

            for (int i = 0; i < allButtonTexts.Length; i++)
            {
                skin.ApplyTo(allButtonTexts[i], skin.ContextMenuTextColor);
            }

            for (int i = 0; i < allButtonSeparators.Length; i++)
            {
                allButtonSeparators[i].color = skin.ContextMenuSeparatorColor;
            }
        }
        internal void RefreshSkin(UISkin skin)
        {
            Image background = GetComponentInChildren <Image>();

            background.color  = skin.DeletePanelBackgroundColor;
            background.sprite = skin.DeletePanelBackground;

            skin.ApplyTo(yesButtonTransform.GetComponent <Button>());
            skin.ApplyTo(noButtonTransform.GetComponent <Button>());

            skin.ApplyTo(titleLabel, skin.DeletePanelTextColor);
            skin.ApplyTo(deletedItemsRestLabel, skin.DeletePanelTextColor);

            for (int i = 0; i < deletedItemNames.Length; i++)
            {
                skin.ApplyTo(deletedItemNames[i], skin.DeletePanelTextColor);
            }

            for (int i = 0; i < deletedItems.Length; i++)
            {
                deletedItems[i].GetComponent <LayoutElement>().preferredHeight = skin.FileHeight;
            }
        }
Beispiel #4
0
 public void SetFileBrowser(FileBrowser fileBrowser, UISkin skin)
 {
     this.fileBrowser = fileBrowser;
     OnSkinRefreshed(skin, false);
 }