📄 themestab.as
字号:
#initclip 10_global.ThemesTab = function() { super(); this.isCanceled = false; this._visible = false; this.settings = null; this.language = null; this.skinTarget = null; this.ignoreColorPicker = false; this.selectedSkin = new CSkin(); this.selectedBigSkin = new CBigSkin(); this.userAction = new Object();};_global.ThemesTab.prototype = new Object();//PUBLIC METHODS._global.ThemesTab.prototype.setEnabled = function(inDialogEnabled) { //skip color choosers, slider and checkbox. suppose that nothing bad happens if they stay //enabled when hidden. this.skinChooser.setEnabled(inDialogEnabled); this.bigSkinChooser.setEnabled(inDialogEnabled);};_global.ThemesTab.prototype.show = function(init) { this.userAction.skin_changed = false; if ( not init ) { this._visible = true; return; } this.isCanceled = false; this.ignoreColorPicker = false; this.selectedSkin = new CSkin(this.settings.user.skin); this.selectedBigSkin = new CBigSkin(this.settings.user.bigSkin); this.skinChooser.setChangeHandler('processSkinChooser', this); this.bigSkinChooser.setChangeHandler('processBigSkinChooser', this); this.backgroundPicker.setChangeHandler('processCustomSkin', this); this.bodyTextPicker.setChangeHandler('processCustomSkin', this); this.borderColorPicker.setChangeHandler('processCustomSkin', this); this.buttonPicker.setChangeHandler('processCustomSkin', this); this.buttonTextPicker.setChangeHandler('processCustomSkin', this); this.buttonBorderPicker.setChangeHandler('processCustomSkin', this); this.dialogPicker.setChangeHandler('processCustomSkin', this); this.dialogTitlePicker.setChangeHandler('processCustomSkin', this); this.userListBackgroundPicker.setChangeHandler('processCustomSkin', this); this.titleTextPicker.setChangeHandler('processCustomSkin', this); if (!this.settings.layout.isSingleRoomMode) { this.roomPicker.setChangeHandler('processCustomSkin', this); this.roomTextPicker.setChangeHandler('processCustomSkin', this); this.enterRoomNotifyPicker.setChangeHandler('processCustomSkin', this); } if (this.settings.layout.showPublicLog) { this.publicLogBackgroundPicker.setChangeHandler('processCustomSkin', this); } if (this.settings.layout.showPrivateLog) { this.privateLogBackgroundPicker.setChangeHandler('processCustomSkin', this); } if (this.settings.layout.showInputBox) { this.inputBoxBackgroundPicker.setChangeHandler('processCustomSkin', this); } this.setSettings(this.settings); this.readSelectedSkin(); this._visible = true;};_global.ThemesTab.prototype.hide = function() { this._visible = false;}_global.ThemesTab.prototype.canceled = function() { return this.isCanceled;};_global.ThemesTab.prototype.setSettings = function(inSettings) { this.settings = inSettings; this.settings.user.skin.prev_backgroundImage = this.settings.user.skin.backgroundImage; this.settings.user.skin.prev_dialogBackgroundImage = this.settings.user.skin.dialogBackgroundImage; this.settings.user.skin.prev_customBg == this.settings.user.skin.customBg; this.skinChooser.removeAll(); this.bigSkinChooser.removeAll(); if (this.language != null) { this.skinChooser.addItem(this.language.dialog.skin.selectskin, null); this.bigSkinChooser.addItem(this.language.dialog.skin.selectBigSkin, null); } else { this.skinChooser.addItem('Select Color Scheme...', null); this.bigSkinChooser.addItem('Select Skin...', null); } //fill skinChooser for (var i = 0; i < this.settings.skin.preset.length; i ++) { if(this.settings.skin.preset[i].id == this.settings.user.skin.id || this.settings.user.skin.customBg == 4) { this.settings.skin.preset[i].backgroundImage = this.settings.user.skin.backgroundImage; this.settings.skin.preset[i].dialogBackgroundImage = this.settings.user.skin.dialogBackgroundImage; } this.skinChooser.addItem(this.settings.skin.preset[i].name, this.settings.skin.preset[i]); this.settings.skin.preset[i].prev_backgroundImage = this.settings.skin.preset[i].backgroundImage; this.settings.skin.preset[i].prev_dialogBackgroundImage = this.settings.skin.preset[i].dialogBackgroundImage; } //fill bigSkinChooser var foundIdx = 1; for (var i = 0; i < this.settings.bigSkin.preset.length; i ++) { this.bigSkinChooser.addItem(this.settings.bigSkin.preset[i].name, this.settings.bigSkin.preset[i]); if (this.settings.bigSkin.preset[i].name == this.settings.user.bigSkin.name) foundIdx = i+1; } this.bigSkinChooser.setChangeHandler(null); this.bigSkinChooser.setSelectedIndex(foundIdx); this.bigSkinChooser.setChangeHandler('processBigSkinChooser', this); this.setSkin(this.settings.user.skin); //var yShift = 0; //var rowHeight = this.privateLogY - this.publicLogY; if (this.settings.layout.isSingleRoomMode) { this.roomPicker.setEnabled(false); this.roomTextPicker.setEnabled(false); this.enterRoomNotifyPicker.setEnabled(false); } if (!this.settings.layout.showPublicLog) { this.publicLogBackgroundPicker.setEnabled(false); } if (!this.settings.layout.showPrivateLog) { this.privateLogBackgroundPicker.setEnabled(false); } if (!this.settings.layout.showInputBox) { this.inputBoxBackgroundPicker.setEnabled(false); }};_global.ThemesTab.prototype.setSkinTarget = function(inSkinTarget) { //trace("setSkinTargetsetSkinTargetsetSkinTargetsetSkinTargetsetSkinTarget"); this.skinTarget = inSkinTarget;};_global.ThemesTab.prototype.getSelectedSkin = function() { this.readSelectedSkin(); return this.selectedSkin;};_global.ThemesTab.prototype.getSelectedBigSkin = function() { return (this.selectedBigSkin == undefined)? this.settings.user.bigSkin : this.selectedBigSkin;};_global.ThemesTab.prototype.applyTextProperty = function(propName, val){ for(var itm in this) { if( this[itm]._name != undefined ) if ( this[itm]._name.indexOf("Label") >= 0 ) { setTextProperty(propName, val, this[itm], true); } }}_global.ThemesTab.prototype.applyStyle = function(inStyle) { for(var itm in this) { if( this[itm]._name != undefined ) if ( this[itm]._name.indexOf("Label") >= 0 ) { this[itm].textColor = inStyle.bodyText; } }};_global.ThemesTab.prototype.applyLanguage = function(inLanguage) { this.language = inLanguage; if (this.skinChooser.getLength() > 0) { this.skinChooser.replaceItemAt(0, this.language.dialog.skin.selectskin); } if (this.bigSkinChooser.getLength() > 0) { this.bigSkinChooser.replaceItemAt(0, this.language.dialog.skin.selectBigSkin); } this.backgroundLabel.text = this.language.dialog.skin.background; this.bodyTextLabel.text = this.language.dialog.skin.bodyText; this.borderColorLabel.text = this.language.dialog.skin.borderColor; this.buttonLabel.text = this.language.dialog.skin.button; this.buttonTextLabel.text = this.language.dialog.skin.buttonText; this.buttonBorderLabel.text = this.language.dialog.skin.buttonBorder; this.dialogLabel.text = this.language.dialog.skin.dialog; this.dialogTitleLabel.text = this.language.dialog.skin.dialogTitle; this.userListBackgroundLabel.text = this.language.dialog.skin.userListBackground; this.roomLabel.text = this.language.dialog.skin.room; this.roomTextLabel.text = this.language.dialog.skin.roomText; this.enterRoomNotifyLabel.text = this.language.dialog.skin.enterRoomNotify; this.publicLogBackgroundLabel.text = this.language.dialog.skin.publicLogBackground; this.privateLogBackgroundLabel.text = this.language.dialog.skin.privateLogBackground; this.inputBoxBackgroundLabel.text = this.language.dialog.skin.inputBoxBackground; this.titleTextLabel.text = this.language.dialog.skin.titleText;};//PRIVATE METHODS._global.ThemesTab.prototype.setSkin = function(inSkin) { //try to set skin chooser name. if (inSkin.name != null) { var foundIdx = null; for (var i = 0; i < this.skinChooser.getLength(); i ++) { var itm = this.skinChooser.getItemAt(i).data; if (itm.name == inSkin.name) { foundIdx = i; _global.FlashChatNS.selectedSkin = itm.id; break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -