📄 themestab.as
字号:
} } if (foundIdx != null) { this.skinChooser.setChangeHandler(null); this.skinChooser.setSelectedIndex(foundIdx); this.skinChooser.setChangeHandler('processSkinChooser', this); } } this.ignoreColorPicker = true; this.backgroundPicker.setValue(inSkin.background); this.bodyTextPicker.setValue(inSkin.bodyText); this.borderColorPicker.setValue(inSkin.borderColor); this.publicLogBackgroundPicker.setValue(inSkin.publicLogBackground); this.privateLogBackgroundPicker.setValue(inSkin.privateLogBackground); this.inputBoxBackgroundPicker.setValue(inSkin.inputBoxBackground); this.buttonPicker.setValue(inSkin.button); this.buttonTextPicker.setValue(inSkin.buttonText); this.buttonBorderPicker.setValue(inSkin.buttonBorder); this.dialogPicker.setValue(inSkin.dialog); this.dialogTitlePicker.setValue(inSkin.dialogTitle); this.userListBackgroundPicker.setValue(inSkin.userListBackground); this.roomPicker.setValue(inSkin.roomBackground); this.roomTextPicker.setValue(inSkin.roomText); this.enterRoomNotifyPicker.setValue(inSkin.enterRoomNotify); this.titleTextPicker.setValue(inSkin.titleText); this.ignoreColorPicker = false;};_global.ThemesTab.prototype.readSelectedSkin = function() { this.selectedSkin.background = this.backgroundPicker.getValue(); this.selectedSkin.bodyText = this.bodyTextPicker.getValue(); this.selectedSkin.borderColor = this.borderColorPicker.getValue(); this.selectedSkin.publicLogBackground = this.publicLogBackgroundPicker.getValue(); this.selectedSkin.privateLogBackground = this.privateLogBackgroundPicker.getValue(); this.selectedSkin.inputBoxBackground = this.inputBoxBackgroundPicker.getValue(); this.selectedSkin.button = this.buttonPicker.getValue(); this.selectedSkin.buttonText = this.buttonTextPicker.getValue(); this.selectedSkin.buttonBorder = this.buttonBorderPicker.getValue(); this.selectedSkin.userListBackground = this.userListBackgroundPicker.getValue(); this.selectedSkin.roomBackground = this.roomPicker.getValue(); this.selectedSkin.roomText = this.roomTextPicker.getValue(); this.selectedSkin.enterRoomNotify = this.enterRoomNotifyPicker.getValue(); this.selectedSkin.dialog = this.dialogPicker.getValue(); this.selectedSkin.dialogTitle = this.dialogTitlePicker.getValue(); this.selectedSkin.titleText = this.titleTextPicker.getValue(); var chooserSkin = this.skinChooser.getSelectedItem().data; if (chooserSkin != null) { this.selectedSkin.id = chooserSkin.id; this.selectedSkin.name = chooserSkin.name; //!!! add line for new property from skin !!! this.selectedSkin.customBg = this.settings.user.skin.customBg; this.selectedSkin.backgroundImage = chooserSkin.backgroundImage; this.selectedSkin.dialogBackgroundImage = chooserSkin.dialogBackgroundImage; this.selectedSkin.showBackgroundImagesOnLogin = chooserSkin.showBackgroundImagesOnLogin; this.selectedSkin.recommendedUserColor = chooserSkin.recommendedUserColor; //extra options (see CSkin.as) this.selectedSkin.scrollBG = chooserSkin.scrollBG; this.selectedSkin.scrollerBG = chooserSkin.scrollerBG; this.selectedSkin.scrollBGPress = chooserSkin.scrollBGPress; this.selectedSkin.scrollBorder = chooserSkin.scrollBorder; this.selectedSkin.closeButton = chooserSkin.closeButton; this.selectedSkin.closeButtonPress = chooserSkin.closeButtonPress; this.selectedSkin.closeButtonBorder = chooserSkin.closeButtonBorder; this.selectedSkin.closeButtonArrow = chooserSkin.closeButtonArrow; this.selectedSkin.minimizeButton = chooserSkin.minimizeButton; this.selectedSkin.minimizeButtonPress = chooserSkin.minimizeButtonPress; this.selectedSkin.minimizeButtonBorder = chooserSkin.minimizeButtonBorder; this.selectedSkin.buttonPress = chooserSkin.buttonPress; this.selectedSkin.check = chooserSkin.check; }};_global.ThemesTab.prototype.processOKButton = function() { this._visible = false; this.isCanceled = false; };_global.ThemesTab.prototype.processCancelButton = function() { if(this.settings.user.skin.name != this.selectedSkin.name || this.userAction.skin_changed) { this.skinTarget.applySkin(this.settings.user.skin); for(var itm in this.userAction) this.userAction[itm] = false; } else { for(var itm in this.userAction) { if(this.userAction[itm] == true) { this.chooseCustomSkinAction(itm, this.settings.user.skin); this.userAction[itm] = false; } } } if(this.settings.user.bigSkin.swf_name != this.bigSkinChooser.getSkinName()) { this.skinTarget.applyBigSkin(this.settings.user.bigSkin); this.skinTarget.applySkin(this.settings.user.skin); } for (var i = 0; i < this.settings.skin.preset.length; i ++) { this.settings.skin.preset[i].backgroundImage = this.settings.skin.preset[i].prev_backgroundImage; this.settings.skin.preset[i].dialogBackgroundImage = this.settings.skin.preset[i].prev_dialogBackgroundImage; } if(this.settings.user.skin.backgroundImage != this.settings.user.skin.prev_backgroundImage || this.settings.user.skin.dialogBackgroundImage != this.settings.user.skin.prev_dialogBackgroundImage) { this.settings.user.skin.backgroundImage = this.settings.user.skin.prev_backgroundImage; this.settings.user.skin.dialogBackgroundImage = this.settings.user.skin.prev_dialogBackgroundImage; this.chooseCustomSkinAction('applyBackground', this.settings.user.skin); _global.FlashChatNS.selectedSkin = this.settings.user.skin.id; } if(this.settings.user.skin.prev_customBg != this.settings.user.skin.customBg) this.settings.user.skin.customBg = this.settings.user.skin.prev_customBg; this._visible = false; this.isCanceled = true;};_global.ThemesTab.prototype.processSkinChooser = function() { var chooserSkin = this.skinChooser.getSelectedItem().data; if (chooserSkin != null) //&& chooserSkin.name != this.selectedSkin.name) { { this.setSkin(chooserSkin); this.readSelectedSkin(); this.skinTarget.applySkin(this.selectedSkin, true); this.userAction.skin_changed = true; }};_global.ThemesTab.prototype.processBigSkinChooser = function() { var tmp = this.bigSkinChooser.getSelectedItem().data; if(tmp != undefined) this.selectedBigSkin = tmp; if (this.selectedBigSkin != null)// && this.selectedBigSkin.swf_name != this.bigSkinChooser.getSkinName()) { { //if (this.selectedBigSkin.swf_name == 'xp_skin') this.setActiveColorScheme('xp'); this.readSelectedSkin(); this.skinTarget.applyBigSkin(this.selectedBigSkin); this.skinTarget.applySkin(this.selectedSkin); //-------------------------------------------------------------------------------------------------// //call module function //-------------------------------------------------------------------------------------------------// this.skinTarget.callModuleFunc('mOnChangeSkin', {skin : this.selectedBigSkin.swf_name}); //-------------------------------------------------------------------------------------------------// }};_global.ThemesTab.prototype.setActiveColorScheme = function(inCS){ for(var i = 0; i < this.skinChooser.getLength(); i++) { if(this.skinChooser.getItemAt(i).label == inCS) { this.skinChooser.setSelectedIndex(i); break; } }}_global.ThemesTab.prototype.chooseCustomSkinAction = function(inName, inSkin) { switch(inName) { case 'titleTextPicker' : this.skinTarget.applyTitleStyle(inSkin); break; case 'inputBoxBackgroundPicker' : case 'privateLogBackgroundPicker' : case 'publicLogBackgroundPicker' : case 'applyBackground' : this.skinTarget.applyBackground(inSkin); break; case 'dialogTitlePicker' : this.skinTarget.applyDialogStyle(inSkin); break; case 'bodyTextPicker' : this.skinTarget.applyLogNOptionPanelStyle(inSkin); this.skinTarget.applyDialogStyle(inSkin); break; case 'borderColorPicker' : this.skinTarget.applyLogNOptionPanelStyle(inSkin); this.skinTarget.applyUserListStyle(inSkin); break; case 'roomPicker' : case 'userListBackgroundPicker' : case 'roomTextPicker' : case 'enterRoomNotifyPicker' : this.skinTarget.applyUserListStyle(inSkin); break; case 'backgroundPicker' : this.skinTarget.applyBackgroundColor(inSkin); this.skinTarget.applyUserListStyle(inSkin); this.skinTarget.applyControlsBackground(inSkin); break; case 'dialogPicker' : this.skinTarget.applyDialogStyle(inSkin); break; default: this.skinTarget.applySkin(inSkin); this.userAction.skin_changed = true; break; }}_global.ThemesTab.prototype.processCustomSkin = function(inControl) { if (!this.ignoreColorPicker) { this.readSelectedSkin(); this.userAction[inControl._name] = true; this.chooseCustomSkinAction(inControl._name, this.selectedSkin); this._parent.setPropTbvSkin( this.dialogPicker.getValue() ); }};Object.registerClass('ThemesTab', _global.ThemesTab);#endinitclip
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -