示例#1
0
        private static void OnFolderChanged()
        {
            if (_customCharaFile == null)
            {
                return;
            }

            var loadCharaToggleIsOn = _loadCharaToggle != null && _loadCharaToggle.isOn;

            if (loadCharaToggleIsOn || _saveCharaToggle != null && _saveCharaToggle.isOn)
            {
                _customCharaFile.Initialize(loadCharaToggleIsOn == true, false);
            }
        }
示例#2
0
        private static void OnFolderChanged()
        {
            _currentRelativeFolder = _folderTreeView.CurrentRelativeFolder;

            if (_customCharaFile == null)
            {
                return;
            }

            if (_loadCharaToggle != null && _loadCharaToggle.isOn || _saveCharaToggle != null && _saveCharaToggle.isOn)
            {
                _customCharaFile.Initialize();

                // Fix add info toggle breaking
                var tglInfo = _customCharaFile.listCtrl.tglAddInfo;
                tglInfo.onValueChanged.Invoke(tglInfo.isOn);
            }
        }
示例#3
0
        private static void OnFolderChanged()
        {
            _currentRelativeFolder = _folderTreeView.CurrentRelativeFolder;

            if (_customCharaFile == null)
            {
                return;
            }

            var isLoad = _loadCharaToggle != null && _loadCharaToggle.isOn;
            var isSave = _saveCharaToggle != null && _saveCharaToggle.isOn;

            if (isLoad || isSave)
            {
                _customCharaFile.Initialize();

                // Fix default cards being shown when refreshing in this way
                var lctrlTrav = _customCharaFile.listCtrl;
                if (isSave)
                {
                    var lst = lctrlTrav.lstFileInfo;
                    // Show user created and downloaded cards but no default cards (sitri needs special handling)
                    foreach (var fileInfo in lst)
                    {
                        fileInfo.fic.Disvisible(fileInfo.category > 1 || fileInfo.FullPath.EndsWith("DefaultData/chara/sitri/sitri.png", StringComparison.OrdinalIgnoreCase));
                    }
                }
                else
                {
                    lctrlTrav.UpdateCategory();
                }

                // Fix add info toggle breaking
                var tglField = lctrlTrav.tglAddInfo;
                tglField.onValueChanged.Invoke(tglField.isOn);
            }
        }