设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 5265|回复: 21
打印 上一主题 下一主题

[已经过期] 请问下 如果修改窗口和背景的透明度

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

跳转到指定楼层
1
发表于 2017-7-22 13:37:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x

类似这样的插件,透明度太高,请问js文件里那一条是修改边框和背景透明度的呢

Lv3.寻梦者

梦石
0
星屑
3404
在线时间
461 小时
注册时间
2013-12-7
帖子
333
2
发表于 2017-7-22 14:37:02 | 只看该作者
opacity{:2_248:}
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

3
 楼主| 发表于 2017-7-22 15:50:52 | 只看该作者

嗯...它只能调整字体的透明度 我把代码给你看下

JAVASCRIPT 代码复制
  1. //
  2. //  ミニインフォメーションウィンドウ ver1.03
  3. //
  4. // ------------------------------------------------------
  5. // Copyright (c) 2016 Yana
  6. // Released under the MIT license
  7. // [url]http://opensource.org/licenses/mit-license.php[/url]
  8. // ------------------------------------------------------
  9. //
  10. // author Yana
  11. //
  12.  
  13. var Imported = Imported || {};
  14. Imported['MiniInformationWindow'] = 1.03;
  15. /*:
  16.  * @plugindesc ver1.03/さまざまな情報を表示するミニウィンドウを定義します。
  17.  * @author Yana
  18.  *
  19.  * @param 【基本設定】
  20.  *
  21.  * @param Switch Key
  22.  * @desc ミニウィンドウの可視状態を切り替えるキーです。
  23.  * @default tab,menu
  24.  *
  25.  * @param Default State
  26.  * @desc ミニウィンドウが初期状態です。
  27.  * openで開いた状態、それ以外で閉じた状態になります。
  28.  * @default open
  29.  *
  30.  * @param Two Col Size
  31.  * @desc ミニウィンドウが2列になる行数です。
  32.  * この行数以上のデータが渡されると、表示が2列になります。
  33.  * @default 8
  34.  *
  35.  * @param Window Offset X
  36.  * @desc ミニウィンドウのX座標の補正値です。
  37.  * @default 0
  38.  *
  39.  * @param Window Offset Y
  40.  * @desc ミニウィンドウのY座標の補正値です。
  41.  * @default 0
  42.  *
  43.  * @param Use Scene Item
  44.  * @desc アイテムシーンでミニウィンドウを使用するかの設定です。
  45.  * @default true
  46.  *
  47.  * @param Use Scene Skill
  48.  * @desc スキルシーンでミニウィンドウを使用するかの設定です。
  49.  * @default true
  50.  *
  51.  * @param Use Scene Equip
  52.  * @desc 装備シーンでミニウィンドウを使用するかの設定です。
  53.  * @default true
  54.  *
  55.  * @param Use Scene Shop
  56.  * @desc ショップシーンでミニウィンドウを使用するかの設定です。
  57.  * @default true
  58.  *
  59.  * @param 【用語の設定】
  60.  *
  61.  * @param Effect Name
  62.  * @desc 有効度の名称です。
  63.  * @default 有効度
  64.  *
  65.  * @param Down Name
  66.  * @desc デバフ有効度の名称です。
  67.  * @default 低下有効度
  68.  *
  69.  * @param Turn Text
  70.  * @desc バフなどに使用されるターンの名称です。
  71.  * @default ターン
  72.  *
  73.  * @param Escape Text
  74.  * @desc 特殊効果 逃げるの名称です。
  75.  * @default 逃げる
  76.  *
  77.  * @param Param Color
  78.  * @desc 詳細ウィンドウに表示する特徴の色設定です。
  79.  * 順番に基本色、システム色、上昇色、下降色です。
  80.  * @default 6,4,24,2
  81.  *
  82.  * @param Param Text1
  83.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  84.  * 1は有効度と無効化です。
  85.  * @default  有効度,弱体有効度,無効化
  86.  *
  87.  * @param Param Text2
  88.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  89.  * 2は追加能力値です。
  90.  * @default 命中率,回避率,会心率,会心回避,魔法回避,魔法反射率,反撃率,再生率,再生率,再生率
  91.  *
  92.  * @param Param Text3
  93.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  94.  * 3は特殊能力値です。
  95.  * @default 狙われ率,防御効果率,回復効果率,薬の知識,消費率,チャージ率,物理ダメージ率,魔法ダメージ率,床ダメージ率,経験値獲得率
  96.  *
  97.  * @param Param Text4
  98.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  99.  * 4は攻撃タブです。
  100.  * @default 攻撃属性付与:,攻撃時ステート付与:,攻撃速度,攻撃回数
  101.  *
  102.  * @param Param Text5
  103.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  104.  * 5はスキルタブです。
  105.  * @default スキルタイプ追加:,スキルタイプ封印:,スキル追加:,スキル封印:
  106.  *
  107.  * @param Param Text6
  108.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  109.  * 6は装備タブです。
  110.  * @default 武器タイプ追加:,防具タイプ追加:,装備固定:,装備封印:,二刀流
  111.  *
  112.  * @param Param Text7
  113.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  114.  * 7はその他タブです。
  115.  * @default 行動回数追加,自動戦闘,防御,身代わり,TP持越し,消滅エフェクト,エンカウント半減,エンカウント無効,不意打ち無効,先制率アップ,取得金額倍化,アイテム取得率倍化
  116.  *
  117.  * @param Defeat Text
  118.  * @desc 消滅エフェクトで使用するサブテキストです。基本使用しません。
  119.  * @default 通常,ボス,瞬間消去,消えない
  120.  *
  121.  * @param Effects Names
  122.  * @desc 使用効果の各効果の名称です。
  123.  * @default HP回復,HPダメージ,MP回復,MPダメージ,TP増加,ステート付与,ステート解除,強化付与,弱体付与,強化解除,弱体解除,特殊効果,成長,スキル習得,コモン
  124.  *
  125.  *  @help ------------------------------------------------------
  126.  * プラグインコマンド
  127.  * ------------------------------------------------------
  128.  * このプラグインにはプラグインコマンドはありません。
  129.  * ------------------------------------------------------
  130.  * 使い方
  131.  * ------------------------------------------------------
  132.  * プラグインを導入し、プラグインパラメータを設定することで動作します。
  133.  *
  134.  * ※メモを使った設定※
  135.  * アイテムや装備、スキルのメモを使うことにより、表示される使用効果や特徴に情報を追加することができます。
  136.  *
  137.  * <情報ウィンドウ追加前:xxx>
  138.  * <AddInfoWindowP:xxx>
  139.  *
  140.  * のいずれかで、使用効果などが表示される前に、
  141.  *
  142.  * <情報ウィンドウ追加後:xxx>
  143.  * <AddInfoWindowA:xxx>
  144.  *
  145.  * のいずれかで、使用効果などが表示された後に情報を追加することができます。
  146.  * これらは複数記述することで、記述しただけ情報を追加できます。
  147.  *
  148.  * ※BattleLayout-SaGaで表示される情報はこの方法で追加を行うことはできません。
  149.  *
  150.  * ------------------------------------------------------
  151.  * 利用規約
  152.  * ------------------------------------------------------
  153.  * 当プラグインはMITライセンスで公開されています。
  154.  * 使用に制限はありません。商用、アダルト、いずれにも使用できます。
  155.  * 二次配布も制限はしませんが、サポートは行いません。
  156.  * 著作表示は任意です。行わなくても利用できます。
  157.  * 要するに、特に規約はありません。
  158.  * バグ報告や使用方法等のお問合せはネ実ツクールスレ、または、Twitterにお願いします。
  159.  * [url]https://twitter.com/yanatsuki_[/url]
  160.  * 素材利用は自己責任でお願いします。
  161.  * ------------------------------------------------------
  162.  * 更新履歴:
  163.  * ver1.03:
  164.  * YEP_StatusMenuCoreと変数名が重複して正常に動作していなかったバグを修正。
  165.  * ver1.02:
  166.  * プラグインパラメータの設定が一部間違っていたのを修正。
  167.  * ver1.01:
  168.  * ウィンドウの横幅を名前も考慮するように修正。
  169.  * MP再生率とTP再生率も表示されるように、パラメータのデフォルト値を調整。
  170.  * ver1.00:
  171.  * 公開
  172.  */
  173.  
  174. (function() {
  175.     ////////////////////////////////////////////////////////////////////////////////////
  176.  
  177.     var parameters = PluginManager.parameters('MiniInformationWindow');
  178.     var switchKey = parameters['Switch Key'].split(',');
  179.     var defaultState = parameters['Default State'] === 'open';
  180.     var turnText = String(parameters['Turn Text'] || 'ターン');
  181.     var escapeText = String(parameters['Escape Text'] || '逃げる');
  182.     var effectNames = String(parameters['Effects Names'] || 'HP回復,HPダメージ,MP回復,MPダメージ,TP増加,ステート付与,ステート解除,強化付与,弱体付与,強化解除,弱体解除,特殊効果,成長,スキル習得,コモン').split(',');
  183.     var defeatText = parameters['Defeat Text'].split(',');
  184.     var paramColor = parameters['Param Color'].split(',');
  185.     var twoColSize = Number(parameters['Two Col Size']);
  186.     var offsetX = Number(parameters['Window Offset X']) || 0;
  187.     var offsetY = Number(parameters['Window Offset Y']) || 0;
  188.     var useSceneItem = parameters['Use Scene Item'] === 'true';
  189.     var useSceneSkill = parameters['Use Scene Skill'] === 'true';
  190.     var useSceneEquip = parameters['Use Scene Equip'] === 'true';
  191.     var useSceneShop = parameters['Use Scene Shop'] === 'true';
  192.     var paramVocab = [];
  193.  
  194.  
  195.     for (var i=1;i<=7;i++) {
  196.         var key = 'Param Text' + i;
  197.         paramVocab[i-1] = parameters[key].split(',');
  198.     }
  199.  
  200.     ////////////////////////////////////////////////////////////////////////////////////
  201.  
  202.     DataManager.preInfoItem = function (item) {
  203.         if (!item) return null;
  204.         if (!item.note) return null;
  205.         if (item._preInfos) return item._preInfos;
  206.         this.makeInfoItem(item);
  207.         return item._preInfos;
  208.     };
  209.  
  210.     DataManager.afterInfoItem = function(item) {
  211.         if (!item) return null;
  212.         if (!item.note) return null;
  213.         if (item._afterInfos) return item._afterInfos;
  214.         this.makeInfoItem(item);
  215.         return item._afterInfos;
  216.     };
  217.  
  218.     DataManager.makeInfoItem = function(item) {
  219.         item._preInfos = [];
  220.         item._afterInfos = [];
  221.         var texts = item.note.split('\n');
  222.         for (var i=0,max=texts.length;i<max;i++) {
  223.             if (texts[i].match(/<(?:情報ウィンドウ追加|AddInfoWindow)([前後PA]):(.+)>/)) {
  224.                 if (RegExp.$1 === '前' || RegExp.$1 === 'P') item._preInfos.push(RegExp.$2);
  225.                 if (RegExp.$1 === '後' || RegExp.$1 === 'A') item._afterInfos.push(RegExp.$2);
  226.             }
  227.         }
  228.     };
  229.  
  230.     ////////////////////////////////////////////////////////////////////////////////////
  231.  
  232.     function Window_MiniInfo() {
  233.         this.initialize.apply(this, arguments);
  234.     }
  235.  
  236.     Window_MiniInfo.prototype = Object.create(Window_Base.prototype);
  237.     Window_MiniInfo.prototype.constructor = Window_MiniInfo;
  238.  
  239.     Window_MiniInfo.prototype.initialize = function() {
  240.         Window_Base.prototype.initialize.call(this, 0,0,32,32);
  241.         this._showInfo = defaultState;
  242.         this.openness = 0;
  243.         this._maxCols = 1;
  244.     };
  245.  
  246.     Window_MiniInfo.prototype.standardFontSize = function() {
  247.         return 18;
  248.     };
  249.  
  250.     Window_MiniInfo.prototype.standardPadding = function() {
  251.         return 6;
  252.     };
  253.  
  254.     Window_MiniInfo.prototype.processDrawIcon = function(iconIndex, textState) {
  255.         this.drawIcon(iconIndex, textState.x + 2, textState.y + 2);
  256.         textState.x += this.standardFontSize() + 8;
  257.     };
  258.  
  259.     Window_MiniInfo.prototype.drawIcon = function(iconIndex, x, y) {
  260.         var bitmap = ImageManager.loadSystem('IconSet');
  261.         var pw = Window_Base._iconWidth;
  262.         var ph = Window_Base._iconHeight;
  263.         var sx = iconIndex % 16 * pw;
  264.         var sy = Math.floor(iconIndex / 16) * ph;
  265.         var n = Math.floor((this.contents.fontSize / 28) * Window_Base._iconWidth);
  266.         this.contents.blt(bitmap, sx, sy, pw, ph, x, y, n, n);
  267.     };
  268.  
  269.     Window_MiniInfo.prototype.exRow = function() {
  270.         if (this._item && this._item.name) return 1;
  271.         return 0;
  272.     };
  273.  
  274.     Window_MiniInfo.prototype.setItem = function(item, rect, maxCols) {
  275.         this._item = item;
  276.         this._maxCols = maxCols ? maxCols : 1;
  277.         this.makeContents();
  278.         if (!maxCols && this._maxCols === 1 && this._data.length > twoColSize) this._maxCols = 2;
  279.         if (this._data.length > 0 && this._showInfo) {
  280.             this.width = this.calcWidth();
  281.             this.height = this.calcHeight();
  282.             this.refresh();
  283.             this.updatePosition(rect, rect.padding);
  284.             this.open();
  285.         } else {
  286.             this.close();
  287.         }
  288.     };
  289.  
  290.     Window_MiniInfo.prototype.updatePosition = function(rect, padding) {
  291.         this.x = Math.min(Math.max(0,rect.width - this.width) + rect.x, Graphics.boxWidth - this.width);
  292.         this.y = rect.y;
  293.         if ((this.y + this.height) > Graphics.boxHeight) {
  294.             this.y = Math.max(rect.y - this.height - padding - rect.height,0);
  295.         }
  296.         this.x += offsetX;
  297.         this.y += offsetY;
  298.     };
  299.  
  300.     Window_MiniInfo.prototype.makeContents = function() {
  301.         var item = this._item;
  302.         var color = paramColor;
  303.         this._data = [];
  304.         var c = '\\C['+color[0]+']';
  305.         var s = '\\C['+color[1]+']';
  306.         var g = '\\C['+color[2]+']';
  307.         var r = '\\C['+color[3]+']';
  308.         var text = '';
  309.         var preInfos = DataManager.preInfoItem(item);
  310.         var afterInfos = DataManager.afterInfoItem(item);
  311.         if (preInfos) this._data = this._data.concat(preInfos);
  312.         if (item.effects){
  313.             for (var i=0,max=item.effects.length;i<max;i++) {
  314.                 var e = item.effects[i];
  315.                 text = '';
  316.                 switch(e.code) {
  317.                     case 11:
  318.                         if (e.value1 > 0 && effectNames[0]) text = s + effectNames[0] + ':' + g + Math.floor(e.value1 * 100) + '%';
  319.                         if (e.value1 < 0 && effectNames[1]) text = s + effectNames[1] + ':' + r + Math.floor(Math.abs(e.value1 * 100)) + '%';
  320.                         if (e.value2 > 0 && effectNames[0]) text = s + effectNames[0] + ':' + g + e.value2;
  321.                         if (e.value2 < 0 && effectNames[1]) text = s + effectNames[1] + ':' + r + Math.abs(e.value2);
  322.                         break;
  323.                     case 12:
  324.                         if (e.value1 > 0 && effectNames[2]) text = s + effectNames[2] + ':' + g + Math.floor(e.value1 * 100) + '%';
  325.                         if (e.value1 < 0 && effectNames[3]) text = s + effectNames[3] + ':' + r + Math.floor(Math.abs(e.value1 * 100)) + '%';
  326.                         if (e.value2 > 0 && effectNames[2]) text = s + effectNames[2] + ':' + g + e.value2;
  327.                         if (e.value2 < 0 && effectNames[3]) text = s + effectNames[3] + ':' + r + Math.abs(e.value2);
  328.                         break;
  329.                     case 13:
  330.                         if (e.value1 > 0 && effectNames[4]) text = s + effectNames[4] + g +  '+' + e.value1;
  331.                         break;
  332.                     case 21:
  333.                         var state = $dataStates[e.dataId];
  334.                         if (state) {
  335.                             var name = state.name;
  336.                             if (e.value1 > 0 && effectNames[5]) text = s + effectNames[5] + ':' + c + name + ' ' + Math.floor(Math.abs(e.value1 * 100)) + '%';
  337.                         }
  338.                         break;
  339.                     case 22:
  340.                         var state = $dataStates[e.dataId];
  341.                         if (state) {
  342.                             var name = state.name;
  343.                             if (e.value1 > 0 && effectNames[6]) text = s + effectNames[6] + ':' + c + name + ' ' + Math.floor(Math.abs(e.value1 * 100)) + '%';
  344.                         }
  345.                         break;
  346.                     case 31:
  347.                         var name = TextManager.param(e.dataId);
  348.                         if (e.value1 > 0 && effectNames[7]) text = s + effectNames[7] + ':' + c + name + ' ' + e.value1 + turnText;
  349.                         break;
  350.                     case 32:
  351.                         var name = TextManager.param(e.dataId);
  352.                         if (e.value1 > 0 && effectNames[8]) text = s + effectNames[8] + ':' + c + name + ' ' + e.value1 + turnText;
  353.                         break;
  354.                     case 33:
  355.                         if (effectNames[9]) {
  356.                             var name = TextManager.param(e.dataId);
  357.                             text = s + effectNames[9] + ':' + c + name;
  358.                         }
  359.                         break;
  360.                     case 34:
  361.                         if  (effectNames[10]) {
  362.                             var name = TextManager.param(e.dataId);
  363.                             text = s + effectNames[10] + ':' + c + name;
  364.                         }
  365.                         break;
  366.                     case 41:
  367.                         if  (effectNames[11]) text = s + effectNames[11] + ':' + c + escapeText;
  368.                         break;
  369.                     case 42:
  370.                         if  (effectNames[12]) {
  371.                             var name = TextManager.param(e.dataId);
  372.                             text = s + effectNames[12] + ':' + c + name + '+' + e.value1;
  373.                         }
  374.                         break;
  375.                     case 43:
  376.                         if  (effectNames[13]) {
  377.                             var name = $dataSkills[e.dataId].name;
  378.                             if (name) text = s + effectNames[13] + ':' + c + name;
  379.                         }
  380.                         break;
  381.                     case 44:
  382.                         if  (effectNames[14]) {
  383.                             var name = $dataCommonEvents[e.dataId].name;
  384.                             if (name) text = s + effectNames[14] + ':' + c + name;
  385.                         }
  386.                         break;
  387.                 }
  388.                 if (text) this._data.push(text);
  389.             }
  390.         }
  391.         if (item.params) {
  392.             for (var i=0;i<8;i++) {
  393.                 var value = item.params[i];
  394.                 if (value !== 0){
  395.                     var ud = value > 0 ? g : r;
  396.                     var sym = value > 0 ? '+' : '';
  397.                     this._data.push(s + TextManager.param(i) + ud + sym + value );
  398.                 }
  399.             }
  400.         }
  401.         if (item.traits) {
  402.             for (var i=0,max=item.traits.length;i<max;i++) {
  403.                 var trait = item.traits[i];
  404.                 var vocab = paramVocab;
  405.                 var dataId = trait.dataId;
  406.                 var value = trait.value;
  407.                 var ud = value > 1.0 ? g : r;
  408.                 var du = value < 1.0 ? g : r;
  409.                 var sym = value > 0 ? '+' : '';
  410.                 text = '';
  411.                 switch (trait.code) {
  412.                     case 11:
  413.                         if (vocab[0][0] && value !== 1.0) {
  414.                             var ele = $dataSystem.elements[dataId];
  415.                             text = c + ele + s + vocab[0][0] + du + 'x' + Math.floor(value * 100) + '%';
  416.                         }
  417.                         break;
  418.                     case 12:
  419.                         if (vocab[0][1]  && value !== 1.0) {
  420.                             var param = TextManager.param(dataId);
  421.                             text = c + param + s + vocab[0][1] + du + 'x' + Math.floor(value * 100) + '%';
  422.                         }
  423.                         break;
  424.                     case 13:
  425.                         if (vocab[0][0]  && value !== 1.0) {
  426.                             var state = $dataStates[dataId].name;
  427.                             text = c + state + s + vocab[0][0] + du + 'x' + Math.floor(value * 100) + '%';
  428.                         }
  429.                         break;
  430.                     case 14:
  431.                         if (vocab[0][2]) {
  432.                             var state = $dataStates[dataId].name;
  433.                             text = c + state + s + vocab[0][2];
  434.                         }
  435.                         break;
  436.                     case 21:
  437.                         if (value !== 1.0) {
  438.                             var param = TextManager.param(dataId);
  439.                             text = s + param + ud + 'x' + Math.floor(value * 100) + '%';
  440.                         }
  441.                         break;
  442.                     case 22:
  443.                         var xparam = vocab[1][dataId];
  444.                         if (xparam && value !== 0) {
  445.                             //if (dataId === 0 && xparam) xparam = TextManager.param(8);
  446.                             //if (dataId === 1 && xparam) xparam = TextManager.param(9);
  447.                             if (dataId === 7 && xparam) xparam = TextManager.hpA + xparam;
  448.                             if (dataId === 8 && xparam) xparam = TextManager.mpA + xparam;
  449.                             if (dataId === 9 && xparam) xparam = TextManager.tpA + xparam;
  450.                             text = s + xparam + du + sym + Math.floor(value * 100) + '%';
  451.                         }
  452.                         break;
  453.                     case 23:
  454.                         var sparam = vocab[2][dataId];
  455.                         if (sparam && value !== 1.0) {
  456.                             if (dataId === 0) ud = c;
  457.                             if (dataId === 4) { sparam = TextManager.mpA + sparam; ud = du; }
  458.                             if (dataId === 5) TextManager.tpA + sparam;
  459.                             if (dataId === 6 || dataId === 7 || dataId === 8) ud = du;
  460.                             text = s + sparam + ud + 'x' + Math.floor(value * 100) + '%';
  461.                         }
  462.                         break;
  463.                     case 31:
  464.                         if (vocab[3][0]) {
  465.                             var ele = $dataSystem.elements[dataId];
  466.                             text = s + vocab[3][0] + c + ele;
  467.                         }
  468.                         break;
  469.                     case 32:
  470.                         if (vocab[3][1] && value > 0) {
  471.                             var state = $dataStates[dataId].name;
  472.                             text = s + vocab[3][1] + c + state + ' ' + Math.floor(value*100) + '%' ;
  473.                         }
  474.                         break;
  475.                     case 33:
  476.                         if (vocab[3][2] && value !== 0) text = s + vocab[3][2] + ud + sym + value;
  477.                         break;
  478.                     case 34:
  479.                         if (vocab[3][3] && value !== 0){
  480.                             var ud = value > 0 ? g : r;
  481.                             text = s + vocab[3][3] + ud + sym + value + '回';
  482.                         }
  483.                         break;
  484.                     case 41:
  485.                     case 42:
  486.                         var stype = $dataSystem.skillTypes[dataId];
  487.                         var v = trait.code === 41 ? vocab[4][0] : vocab[4][1];
  488.                         if (v && stype) text = s + v + c + stype;
  489.                         break;
  490.                     case 43:
  491.                     case 44:
  492.                         var skill = $dataSkills[dataId];
  493.                         var v = trait.code === 43 ? vocab[4][2] : vocab[4][3];
  494.                         if (v && skill) text = s + v + c + skill.name;
  495.                         break;
  496.                     case 51:
  497.                     case 52:
  498.                         var type = trait.code === 51 ? $dataSystem.weaponTypes[dataId] : $dataSystem.armorTypes[dataId];
  499.                         var v = trait.code === 51 ? vocab[5][0] : vocab[5][1];
  500.                         if (v && type) text = s + v + c + type;
  501.                         break;
  502.                     case 53:
  503.                     case 54:
  504.                         var etype = $dataSystem.equipTypes[dataId];
  505.                         var v = trait.code === 53 ? vocab[5][2] : vocab[5][3];
  506.                         if (v && etype) text = s + v + c + etype;
  507.                         break;
  508.                     case 55:
  509.                         if (vocab[5][4]) text = s + vocab[5][4];
  510.                         break;
  511.                     case 61:
  512.                         if (vocab[6][0] && value > 0) text = s + vocab[6][0] + du + sym + (value * 100) + '%';
  513.                         break;
  514.                     case 62:
  515.                         if (vocab[6][1+dataId]) {
  516.                             text = s + vocab[6][1 + dataId];
  517.                         }
  518.                         break;
  519.                     case 63:
  520.                         if (vocab[6][5]) text = s + vocab[6][5] + defeatText[dataId];
  521.                         break;
  522.                     case 64:
  523.                         if (vocab[6][6+dataId]) text = s + vocab[6][6+dataId];
  524.                         break;
  525.                     case 111:
  526.                         if (vocab[0][0] && value !== 0) {
  527.                             var ele = $dataSystem.elements[dataId];
  528.                             du = value < 0 ? g : r;
  529.                             text = c + ele + s + vocab[0][0] + du + sym + Math.floor(value * 100) + '%';
  530.                         }
  531.                         break;
  532.                     case 112:
  533.                         if (vocab[0][1]  && value !== 0) {
  534.                             var param = TextManager.param(dataId);
  535.                             du = value < 0 ? g : r;
  536.                             text = c + param + s + vocab[0][1] + du + sym + Math.floor(value * 100) + '%';
  537.                         }
  538.                         break;
  539.                     case 113:
  540.                         if (vocab[0][0]  && value !== 0) {
  541.                             var state = $dataStates[dataId].name;
  542.                             du = value < 0 ? g : r;
  543.                             text = c + state + s + vocab[0][0] + du + sym + Math.floor(value * 100) + '%';
  544.                         }
  545.                         break;
  546.                     case 121:
  547.                         if (value !== 0) {
  548.                             var param = TextManager.param(dataId);
  549.                             text = s + param + ud + sym + value;
  550.                         }
  551.                         break;
  552.                     case 123:
  553.                         var sparam = vocab[2][dataId];
  554.                         if (sparam && value !== 0) {
  555.                             ud = value > 0 ? g : r;
  556.                             du = value < 0 ? g : r;
  557.                             if (dataId === 0) ud = c;
  558.                             if (dataId === 4) { sparam = TextManager.mpA + sparam; ud = du; }
  559.                             if (dataId === 5) TextManager.tpA + sparam;
  560.                             if (dataId === 6 || dataId === 7 || dataId === 8) ud = du;
  561.                             text = s + sparam + ud + sym + Math.floor(value * 100) + '%';
  562.                         }
  563.                         break;
  564.                 }
  565.  
  566.                 if(text) this._data.push(text);
  567.             }
  568.         }
  569.         if (item.data) this._data = this._data.concat(item.data);
  570.         if (afterInfos) this._data = this._data.concat(afterInfos);
  571.     };
  572.  
  573.     Window_MiniInfo.prototype.calcWidth = function() {
  574.         var w = 32;
  575.         var ic = 0;
  576.         var nw = 0;
  577.         if (this._item && this._item.name){
  578.             var name = this._item.name;
  579.             if (this._item.iconIndex) name = '\\I[' + this._item.iconIndex + ']' + name;
  580.             name = name.replace(/\\C\[\d+\]/gi,'');
  581.             name = name.replace(/\\I\[\d+\]/gi,function(){
  582.                 ic+=1;
  583.                 return '';
  584.             }.bind(this));
  585.             nw = this.textWidth(name) + ic * (this.standardFontSize() + 8);
  586.         }
  587.         for (var i=0,max=this._data.length;i<max;i++) {
  588.             var text = this._data[i];
  589.             text = text.replace(/\\C\[\d+\]/gi,'');
  590.             text = text.replace(/\\I\[\d+\]/gi,function(){
  591.                 ic+=1;
  592.                 return '';
  593.             }.bind(this));
  594.             var n = this.textWidth(text) + ic * (this.standardFontSize() + 8);
  595.             if (n > w) w = n;
  596.         }
  597.         w = w * this._maxCols;
  598.         w = nw > w ? nw : w;
  599.         return w + 32;
  600.     };
  601.  
  602.     Window_MiniInfo.prototype.calcHeight = function() {
  603.         return (Math.ceil(this._data.length / this._maxCols) + this.exRow()) * (this.standardFontSize() + 2) + this.standardPadding() * 2 + 24;
  604.     };
  605.  
  606.     Window_MiniInfo.prototype.refresh = function() {
  607.         this.createContents();
  608.         this.contents.clear();
  609.         var fs = this.standardFontSize() + 2;
  610.         var oy = 8;
  611.         if (this.exRow()) {
  612.             oy += 8;
  613.             var name = this._item.name;
  614.             if (this._item.iconIndex) name = '\\I[' + this._item.iconIndex + ']' + name;
  615.             this.drawTextEx(name, 8, 4);
  616.             this.contents.paintOpacity = 128;
  617.             this.contents.fillRect(4, fs + 12, this.contentsWidth() - 8, 2, this.normalColor());
  618.             this.contents.paintOpacity = 255;
  619.         }
  620.         for (var i=0,max=this._data.length;i<max;i++) {
  621.             var x = 6 + Math.floor(i / (max / this._maxCols)) * Math.floor(this.contentsWidth() / 2);
  622.             var y = ((i % Math.ceil(max / this._maxCols))+this.exRow()) * fs + oy;
  623.             this.drawTextEx(this._data[i],x,y);
  624.         }
  625.     };
  626.  
  627.     ////////////////////////////////////////////////////////////////////////////////////
  628.  
  629.     var __WSelectable_setHelpWindowItem = Window_Selectable.prototype.setHelpWindowItem;
  630.     Window_Selectable.prototype.setHelpWindowItem = function(item) {
  631.         __WSelectable_setHelpWindowItem.call(this, item);
  632.         this.setMiniWindow(item);
  633.     };
  634.  
  635.     var __WSelectable_deactivate = Window_Selectable.prototype.deactivate;
  636.     Window_Selectable.prototype.deactivate = function() {
  637.         __WSelectable_deactivate.call(this);
  638.         if (this._miniInfoWindow) this._miniInfoWindow.close();
  639.     };
  640.  
  641.     var __WSelectable_processHandling = Window_Selectable.prototype.processHandling;
  642.     Window_Selectable.prototype.processHandling = function() {
  643.         __WSelectable_processHandling.call(this);
  644.         if (this.isOpenAndActive() && this._miniInfoWindow && this.isIwSwitchTriggered()) {
  645.             this._miniInfoWindow._showInfo = !this._miniInfoWindow._showInfo;
  646.             if (this._miniInfoWindow._showInfo){
  647.                 this._miniInfoWindow.open();
  648.                 this.updateHelp();
  649.             }
  650.             if (!this._miniInfoWindow._showInfo) this._miniInfoWindow.close();
  651.         }
  652.     };
  653.  
  654.     Window_Selectable.prototype.isIwSwitchTriggered = function() {
  655.         for (var i=0,max=switchKey.length;i<max;i++) {
  656.             var key = switchKey[i];
  657.             if (Input.isTriggered(key)) return true;
  658.         }
  659.         return false;
  660.     };
  661.  
  662.     Window_Selectable.prototype.setMiniWindow = function(item) {
  663.         if (this._miniInfoWindow){
  664.             if (this.active && item) {
  665.                 var rect = this.itemRect(this.index());
  666.                 rect.x = rect.x + this.x;
  667.                 rect.y = rect.y + rect.height + this.y + this.standardPadding() + 4;
  668.                 rect.padding = this.standardPadding();
  669.                 this._miniInfoWindow.setItem(item, rect);
  670.             } else {
  671.                 this._miniInfoWindow.close();
  672.             }
  673.         }
  674.     };
  675.  
  676.     ////////////////////////////////////////////////////////////////////////////////////
  677.  
  678.     Scene_Base.prototype.createMiniWindow = function() {
  679.         this._miniWindow = new Window_MiniInfo();
  680.         if (this._buyWindow) this._buyWindow._miniInfoWindow = this._miniWindow;
  681.         if (this._sellWindow) this._sellWindow._miniInfoWindow = this._miniWindow;
  682.         if (this._slotWindow) this._slotWindow._miniInfoWindow = this._miniWindow;
  683.         if (this._itemWindow) this._itemWindow._miniInfoWindow = this._miniWindow;
  684.         this.addChild(this._miniWindow);
  685.     };
  686.  
  687.     ////////////////////////////////////////////////////////////////////////////////////
  688.  
  689.     var __SItem_create = Scene_Item.prototype.create;
  690.     Scene_Item.prototype.create = function() {
  691.         __SItem_create.call(this);
  692.         if (useSceneItem) this.createMiniWindow();
  693.     };
  694.  
  695.     ////////////////////////////////////////////////////////////////////////////////////
  696.  
  697.     var __SSkill_create = Scene_Skill.prototype.create;
  698.     Scene_Skill.prototype.create = function() {
  699.         __SSkill_create.call(this);
  700.         if (useSceneSkill) this.createMiniWindow();
  701.     };
  702.  
  703.     ////////////////////////////////////////////////////////////////////////////////////
  704.  
  705.     var __SEquip_create = Scene_Equip.prototype.create;
  706.     Scene_Equip.prototype.create = function() {
  707.         __SEquip_create.call(this);
  708.         if (useSceneEquip) this.createMiniWindow();
  709.     };
  710.  
  711.     ////////////////////////////////////////////////////////////////////////////////////
  712.  
  713.     var __SShop_create = Scene_Shop.prototype.create;
  714.     Scene_Shop.prototype.create = function() {
  715.         __SShop_create.call(this);
  716.         if (useSceneShop) this.createMiniWindow();
  717.     };
  718.  
  719.     ////////////////////////////////////////////////////////////////////////////////////
  720.  
  721. }());
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3533
在线时间
1057 小时
注册时间
2009-10-3
帖子
185
4
发表于 2017-7-22 17:38:41 | 只看该作者
SRD的Super Tools Engine插件
开启插件后,进入游戏测试,然后按F12
第三个选项,然后就可以调试窗口的长宽高,透明度,窗口内选项纵横排列。
自己给自己挖了一个坑,然后掉下去的我,竟然爬不上来了,呵呵(NMB)。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1934
在线时间
403 小时
注册时间
2015-8-30
帖子
395
5
发表于 2017-7-22 18:47:48 | 只看该作者
Window类自带opacity和back_opacity属性哦
小仙女一枚~
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

6
 楼主| 发表于 2017-7-22 19:53:54 | 只看该作者
有丘直方 发表于 2017-7-22 18:47
Window类自带opacity和back_opacity属性哦

嗯...就是说不是修改一两个数字就能解决的吗

点评

除此之外Window类还提供了一个content_opacity属性来设置内容不透明度,自己去琢磨琢磨。我好像说得太多了,,  发表于 2017-7-22 20:23
假如你要操作的窗口是window的话,那么你只需要调用window.opacity=128就可以半透明啦。back_opacity默认是192,如果你要让背景更透明最好把它修改得小于192  发表于 2017-7-22 20:22
回复短的话在点评里说就好啦。如果你稍微懂一点脚本的话其实很简单,所有的窗口都是Window类的子类的对象,你去翻帮助手册的话会发现这两个属性  发表于 2017-7-22 20:20
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

7
 楼主| 发表于 2017-7-22 19:58:01 | 只看该作者
zlpwb1666 发表于 2017-7-22 17:38
SRD的Super Tools Engine插件
开启插件后,进入游戏测试,然后按F12
第三个选项,然后就可以调试窗口的长宽 ...

谢谢~我试试哦
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

8
 楼主| 发表于 2017-7-22 20:27:45 | 只看该作者
zlpwb1666 发表于 2017-7-22 17:38
SRD的Super Tools Engine插件
开启插件后,进入游戏测试,然后按F12
第三个选项,然后就可以调试窗口的长宽 ...

嗯 长宽高和位置这些倒是没有问题,不过透明度调整过后没办法保存呢,一退出来就复原了
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

9
 楼主| 发表于 2017-7-22 20:37:33 | 只看该作者
有丘直方 发表于 2017-7-22 18:47
Window类自带opacity和back_opacity属性哦

谢谢~我就是不太懂脚本,比如我上面发的那个,里面根本没有window.opacity,需要修改哪一点呢

点评

如果本来就没有这一行的话可以在initialize方法里面自己加吧,JavaScript我本人不太熟悉,不知道它初始化是怎么搞的,但应该是类似的方法  发表于 2017-7-23 10:12
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3404
在线时间
461 小时
注册时间
2013-12-7
帖子
333
10
发表于 2017-7-22 21:17:08 | 只看该作者
本帖最后由 ekmomo 于 2017-7-22 21:26 编辑

你先试一下,不行的话把工程发给我…………实话实说,我看的一脸懵逼……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-30 07:00

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表