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

Project1

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

[已经过期] 萌新问下这个插件 显示地图图标按钮为什么无效

[复制链接]

Lv1.梦旅人

梦石
0
星屑
65
在线时间
90 小时
注册时间
2007-8-14
帖子
25
跳转到指定楼层
1
发表于 2016-8-3 11:58:15 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
萌新的预期:
在地图上显示一些icon,点击打开菜单栏,但是并没有显示出来
修改了插件设置中的icon图标和位置,也不行





JAVASCRIPT 代码复制下载
  1. // ============================================================================
  2. // Plug-in: DMV_MapButtons.js
  3. // Version: 1.0.1
  4. // Author: David Bow (Dekita)
  5. // MailTo: [email][email protected][/email]
  6. // ============================================================================
  7.  
  8. /*:
  9.  * @author Dekita ([url]www.dekyde.com[/url])
  10.  *
  11.  * @plugindesc This plugin allows for the game map screen to show some
  12.  * cool menu buttons that run user defined code upon trigger.
  13.  *
  14.  * @help
  15.  * ============================================================================
  16.  * ■ System Information:
  17.  * ============================================================================
  18.  * This plugin creates upto 25 map buttons that can be used to run almost any
  19.  * code you desire. By default, 7 of these buttons trigger the main menu
  20.  * scenes, and the rest buttons are left used to allow for expansion with  
  21.  * custom plugins that create a new scene.
  22.  *
  23.  * Each button consists of two states - hot, and cold.
  24.  * Cold state means that the button is not being pressed, hot means that it is.
  25.  * Each state also has its own image, in this case, an icon. This means that
  26.  * each map button is designated two icon id's, one for hot, and one for cold.
  27.  *
  28.  * Note:
  29.  * As of v1.0.1 there is a dedicated page for this system on my website,
  30.  * The aforementioned page has some examples of the advanced features this
  31.  * system provides. It can be found at the following web address:
  32.  * [url]www.dekyde.com/dmv-mapbuttons[/url]
  33.  *
  34.  * ============================================================================
  35.  * ■ Script Calls:
  36.  * ============================================================================
  37.  * $gameSystem.resetMapButtons();
  38.  * \_: Resets all map buttons x, y, icons, function, visible flags to default
  39.  *
  40.  * $gameSystem.mapButton(id);
  41.  * \_: Returns the button sprite for map button 'id'
  42.  *
  43.  * $gameSystem.mapButtonX(id);
  44.  * \_: Returns the button sprite x position for map button 'id'
  45.  *
  46.  * $gameSystem.setMapButtonX(id, newX);
  47.  * | : Sets the x position of map button 'id' to 'newX'
  48.  * \_: Returns the new x position, or -1 if invalid id given
  49.  *
  50.  * $gameSystem.mapButtonY(id);
  51.  * \_: Returns the button sprite y position for map button 'id'
  52.  *
  53.  * $gameSystem.setMapButtonY(id, newY);
  54.  * | : Sets the y position of map button 'id' to 'newY'
  55.  * \_: Returns the new y position, or -1 if invalid id given
  56.  *
  57.  * $gameSystem.mapButtonIcon1(id);
  58.  * \_: Returns the cold icon for button 'id', or 0 if invalid id given
  59.  *
  60.  * $gameSystem.mapButtonIcon2(id);
  61.  * \_: Returns the hot icon for button 'id', or 0 if invalid id given
  62.  *
  63.  * $gameSystem.setMapButtonIcons(id, icon1, icon2);
  64.  * | : Sets button 'id's cold icon to 'icon1', and hot icon to 'icon2'
  65.  * \_: Returns true if icons changed, false otherwise
  66.  *
  67.  * $gameSystem.mapButtonVisible(id);
  68.  * \_: Returns the visibility for button 'id', or false if invalid id given
  69.  *
  70.  * $gameSystem.setMapButtonVisible(id, visiBool);
  71.  * | : Sets the visibility of button 'id' to 'visiBool'
  72.  * \_: Returns the new visibility for button 'id', or false if invalid id given
  73.  *
  74.  * $gameSystem.mapButtonFunk();
  75.  * \_: Returns the function string for button 'id', or false if invalid id
  76.  *
  77.  * $gameSystem.setMapButtonFunk(id, newFunkString);
  78.  * | : Sets the function for button 'id' to 'newFunkString'
  79.  * \_: Returns the new function string for button 'id', or false if invalid id
  80.  *
  81.  * ============================================================================
  82.  * ■ Terms && Conditions:
  83.  * ============================================================================
  84.  * This plugin is completely free to use, both commercially and privately -
  85.  * Providing the following copy is shown within the project credits;
  86.  *
  87.  * Copyright (C) 2015 - Dekyde Studios
  88.  * Dekyde Studios Developer: Dekita - dekita(at)dekyde.com
  89.  *
  90.  * Additionally, this header should remain intact at all times.
  91.  *
  92.  * You are not allowed to redistribute this plugin directly. Instead, provide
  93.  * a link to the following website;
  94.  * [url]www.dekyde.com[/url]
  95.  *
  96.  * ============================================================================
  97.  * ■ Financial Contributions:
  98.  * ============================================================================
  99.  * If you like my work and want to see more of it in the future, I ask that you
  100.  * consider offering a financial donation.
  101.  *
  102.  * Most of the plugins I write are free to use commercially, and many hours of
  103.  * work go into each and every one - not including the time spent bug hunting
  104.  * and performing optimization modifications.
  105.  *
  106.  * If you do wish to provide your support, you can do so at the following link;
  107.  * [url]www.patreon.com/Dekita[/url]
  108.  *
  109.  * ============================================================================
  110.  * ■ Stay Up To Date:
  111.  * ============================================================================
  112.  * I advise that you check regularly to see if any of the plugins you use
  113.  * have been updated. The plugin updates will include things like bugfixes and
  114.  * new features, so it is highly recommended.
  115.  *
  116.  * You can get the latest versions of my Mv plugins from [url]www.dekyde.com/DMV[/url]
  117.  *
  118.  * ============================================================================
  119.  * ■ Change Log:
  120.  * ============================================================================
  121.  * v.1.0.1 - Changed plugin name from DMV_MapMenuButtons to DMV_MapButtons,
  122.  *         - Complete overhaul to button containers structure,
  123.  *         - Increased possible buttons from 9 to 25,
  124.  *         - Added script call: $gameSystem.resetMapButtons();
  125.  *         - Added script call: $gameSystem.mapButton();
  126.  *         - Added script call: $gameSystem.mapButtonX();
  127.  *         - Added script call: $gameSystem.mapButtonY();
  128.  *         - Added script call: $gameSystem.setMapButtonX();
  129.  *         - Added script call: $gameSystem.setMapButtonY();
  130.  *         - Added script call: $gameSystem.mapButtonIcon1();
  131.  *         - Added script call: $gameSystem.mapButtonIcon2();
  132.  *         - Added script call: $gameSystem.setMapButtonIcons();
  133.  *         - Added script call: $gameSystem.mapButtonVisible();
  134.  *         - Added script call: $gameSystem.setMapButtonVisible();
  135.  *         - Added script call: $gameSystem.mapButtonFunk();
  136.  *         - Added script call: $gameSystem.setMapButtonFunk();
  137.  * v.1.0.0 - Initial Release,
  138.  *
  139.  * ============================================================================
  140.  *  [url]www.dekyde.com[/url]
  141.  * ============================================================================
  142.  * @param Button 1 Data
  143.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  144.  * Default: 466, 2, 321, 337, 1
  145.  * @default 466, 2, 321, 337, 1
  146.  *
  147.  * @param Button 1 Func
  148.  * @desc Sets the function used for when button 1 is triggered
  149.  * @default SceneManager.push(Scene_Item)
  150.  *
  151.  * @param Button 2 Data
  152.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  153.  * Default: 500, 2, 323, 339, 1
  154.  * @default 500, 2, 323, 339, 1
  155.  *
  156.  * @param Button 2 Func
  157.  * @desc Sets the function used for when button 2 is triggered
  158.  * @default $gameParty.setMenuActor($gameParty.leader());SceneManager.push(Scene_Skill)
  159.  *
  160.  * @param Button 3 Data
  161.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  162.  * Default: 534, 2, 324, 340, 1
  163.  * @default 534, 2, 324, 340, 1
  164.  *
  165.  * @param Button 3 Func
  166.  * @desc Sets the function used for when button 3 is triggered
  167.  * @default $gameParty.setMenuActor($gameParty.leader());SceneManager.push(Scene_Equip)
  168.  *
  169.  * @param Button 4 Data
  170.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  171.  * Default: 568, 2, 326, 342, 1
  172.  * @default 568, 2, 326, 342, 1
  173.  *
  174.  * @param Button 4 Func
  175.  * @desc Sets the function used for when button 4 is triggered
  176.  * @default $gameParty.setMenuActor($gameParty.leader());SceneManager.push(Scene_Status)
  177.  *
  178.  * @param Button 5 Data
  179.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  180.  * Default: 602, 2, 329, 345, 1
  181.  * @default 602, 2, 329, 345, 1
  182.  *
  183.  * @param Button 5 Func
  184.  * @desc Sets the function used for when button 5 is triggered
  185.  * @default SceneManager.push(Scene_Options)
  186.  *
  187.  * @param Button 6 Data
  188.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  189.  * Default: 636, 2, 331, 347, 1
  190.  * @default 636, 2, 331, 347, 1
  191.  *
  192.  * @param Button 6 Func
  193.  * @desc Sets the function used for when button 6 is triggered
  194.  * @default SceneManager.push(Scene_Save)
  195.  *
  196.  * @param Button 7 Data
  197.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  198.  * Default: 670, 2, 332, 348, 1
  199.  * @default 670, 2, 332, 348, 1
  200.  *
  201.  * @param Button 7 Func
  202.  * @desc Sets the function used for when button 7 is triggered
  203.  * @default SceneManager.push(Scene_GameEnd)
  204.  *
  205.  * @param Button 8 Data
  206.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  207.  * Default: -1, -1, 0, 0, 0
  208.  * @default -1, -1, 0, 0, 0
  209.  *
  210.  * @param Button 8 Func
  211.  * @desc Sets the function used for when button 8 is triggered
  212.  * @default null
  213.  *
  214.  * @param Button 9 Data
  215.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  216.  * Default: -1, -1, 0, 0, 0
  217.  * @default -1, -1, 0, 0, 0
  218.  *
  219.  * @param Button 9 Func
  220.  * @desc Sets the function used for when button 9 is triggered
  221.  * @default null
  222.  *
  223.  * @param Button 10 Data
  224.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  225.  * Default: -1, -1, 0, 0, 0
  226.  * @default -1, -1, 0, 0, 0
  227.  *
  228.  * @param Button 10 Func
  229.  * @desc Sets the function used for when button 10 is triggered
  230.  * @default null
  231.  *
  232.  * @param Button 11 Data
  233.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  234.  * Default: -1, -1, 0, 0, 0
  235.  * @default -1, -1, 0, 0, 0
  236.  *
  237.  * @param Button 11 Func
  238.  * @desc Sets the function used for when button 11 is triggered
  239.  * @default null
  240.  *
  241.  * @param Button 12 Data
  242.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  243.  * Default: -1, -1, 0, 0, 0
  244.  * @default -1, -1, 0, 0, 0
  245.  *
  246.  * @param Button 12 Func
  247.  * @desc Sets the function used for when button 12 is triggered
  248.  * @default null
  249.  *
  250.  * @param Button 13 Data
  251.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  252.  * Default: -1, -1, 0, 0, 0
  253.  * @default -1, -1, 0, 0, 0
  254.  *
  255.  * @param Button 13 Func
  256.  * @desc Sets the function used for when button 13 is triggered
  257.  * @default null
  258.  *
  259.  * @param Button 14 Data
  260.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  261.  * Default: -1, -1, 0, 0, 0
  262.  * @default -1, -1, 0, 0, 0
  263.  *
  264.  * @param Button 14 Func
  265.  * @desc Sets the function used for when button 14 is triggered
  266.  * @default null
  267.  *
  268.  * @param Button 15 Data
  269.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  270.  * Default: -1, -1, 0, 0, 0
  271.  * @default -1, -1, 0, 0, 0
  272.  *
  273.  * @param Button 15 Func
  274.  * @desc Sets the function used for when button 15 is triggered
  275.  * @default null
  276.  *
  277.  * @param Button 16 Data
  278.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  279.  * Default: -1, -1, 0, 0, 0
  280.  * @default -1, -1, 0, 0, 0
  281.  *
  282.  * @param Button 16 Func
  283.  * @desc Sets the function used for when button 16 is triggered
  284.  * @default null
  285.  *
  286.  * @param Button 17 Data
  287.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  288.  * Default: -1, -1, 0, 0, 0
  289.  * @default -1, -1, 0, 0, 0
  290.  *
  291.  * @param Button 17 Func
  292.  * @desc Sets the function used for when button 17 is triggered
  293.  * @default null
  294.  *
  295.  * @param Button 18 Data
  296.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  297.  * Default: -1, -1, 0, 0, 0
  298.  * @default -1, -1, 0, 0, 0
  299.  *
  300.  * @param Button 18 Func
  301.  * @desc Sets the function used for when button 18 is triggered
  302.  * @default null
  303.  *
  304.  * @param Button 19 Data
  305.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  306.  * Default: -1, -1, 0, 0, 0
  307.  * @default -1, -1, 0, 0, 0
  308.  *
  309.  * @param Button 19 Func
  310.  * @desc Sets the function used for when button 19 is triggered
  311.  * @default null
  312.  *
  313.  * @param Button 20 Data
  314.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  315.  * Default: -1, -1, 0, 0, 0
  316.  * @default -1, -1, 0, 0, 0
  317.  *
  318.  * @param Button 20 Func
  319.  * @desc Sets the function used for when button 20 is triggered
  320.  * @default null
  321.  *
  322.  * @param Button 21 Data
  323.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  324.  * Default: -1, -1, 0, 0, 0
  325.  * @default -1, -1, 0, 0, 0
  326.  *
  327.  * @param Button 21 Func
  328.  * @desc Sets the function used for when button 21 is triggered
  329.  * @default null
  330.  *
  331.  * @param Button 22 Data
  332.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  333.  * Default: -1, -1, 0, 0, 0
  334.  * @default -1, -1, 0, 0, 0
  335.  *
  336.  * @param Button 22 Func
  337.  * @desc Sets the function used for when button 22 is triggered
  338.  * @default null
  339.  *
  340.  * @param Button 23 Data
  341.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  342.  * Default: -1, -1, 0, 0, 0
  343.  * @default -1, -1, 0, 0, 0
  344.  *
  345.  * @param Button 23 Func
  346.  * @desc Sets the function used for when button 23 is triggered
  347.  * @default null
  348.  *
  349.  * @param Button 24 Data
  350.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  351.  * Default: -1, -1, 0, 0, 0
  352.  * @default -1, -1, 0, 0, 0
  353.  *
  354.  * @param Button 24 Func
  355.  * @desc Sets the function used for when button 24 is triggered
  356.  * @default null
  357.  *
  358.  * @param Button 25 Data
  359.  * @desc Sets x, y, coldIcon, hotIcon, and visibility flag
  360.  * Default: -1, -1, 0, 0, 0
  361.  * @default -1, -1, 0, 0, 0
  362.  *
  363.  * @param Button 25 Func
  364.  * @desc Sets the function used for when button 25 is triggered
  365.  * @default null
  366.  */
  367.  
  368. /**
  369.  * Checks for DMV Core plugin and register if available
  370.  */
  371. (function(){
  372.   if (typeof DMV === 'undefined') {
  373.     var strA = "You need to install the DMV_Core plugin ";
  374.     var strB = "in order for other DMV plugins to work!";
  375.     throw new Error(strA + strB);
  376.   }else{
  377.     if (!DMV.require("DMV_Core","1.0.1")){
  378.       throw new Error("Your copy of DMV Core is outdated, please update!!");
  379.     };
  380.     DMV.register("MapButtons", "1.0.1", "16/11/2o15");
  381.   }
  382. })();
  383.  
  384. /**
  385.  * AnonomousFunction(DMV)
  386.  */
  387. (function($){
  388.   /**
  389.    * Use strict mode
  390.    */
  391.   "use strict";
  392.  
  393.   /**
  394.    * params
  395.    * Holds all parameters for this plugin
  396.    */
  397.   var params = PluginManager.parameters('DMV_MapButtons');
  398.  
  399.   /**
  400.    * button_size
  401.    * Holds integer for number of default button params to read
  402.    */
  403.   var button_size = 25;
  404.  
  405.   /**
  406.    * DMV.createMapButton(icon1, icon2, parent)
  407.    * @param icon1 the icon to show for buttons cold frame
  408.    * @param icon2 the icon to show for buttons hot frame
  409.    * @param parent [optional] if given will call addChild
  410.    *        to add the button into the parents child list
  411.    * [url=home.php?mod=space&uid=352621]@return[/url] new button
  412.    */
  413.   $.createMapButton = function(parent, id) {
  414.     var button = new $.Sprite.MapButton(id);
  415.     button.bitmap = ImageManager.loadSystem('IconSet');
  416.     var icon1 = $gameSystem.mapButtonIcon1(id);
  417.     var icon2 = $gameSystem.mapButtonIcon2(id);
  418.     button.setBothFrames(icon1, icon2);
  419.     if (parent !== undefined && parent.addChild){
  420.       parent.addChild(button);
  421.     };
  422.     return button;
  423.   };
  424.  
  425.   /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  426.    * DMV.Sprite.MapButton.prototype Variables && Functions
  427.    **/////////////////////////////////////////////////////
  428.   $.Sprite.MapButton = $.extend(Sprite_Button);
  429.   (function (mapbutt){
  430.     /**
  431.      * DMV.Sprite.MapButton.prototype.initialize(buttID);
  432.      * @param buttID the id of this button
  433.      * Initializes the map button
  434.      */
  435.     var initialize = mapbutt.initialize;
  436.     mapbutt.initialize = function(buttID) {
  437.       initialize.apply(this, arguments);
  438.       this._map_butt_id = buttID;
  439.     };
  440.     /**
  441.      * DMV.Sprite.MapButton.prototype.isButtonTouched();
  442.      * @return true if button is being touched and  
  443.      * game message is not showing, false otherwise.
  444.      */
  445.     var isButtonTouched = mapbutt.isButtonTouched;
  446.     mapbutt.isButtonTouched = function(){
  447.       return !$gameMessage.isBusy() && isButtonTouched.apply(this, arguments);
  448.     }
  449.  
  450.     /**
  451.      * DMV.Sprite.MapButton.prototype.setBothFrames(icon1, icon2);
  452.      * @param icon1 the icon to show for buttons cold frame
  453.      * @param icon2 the icon to show for buttons hot frame
  454.      */
  455.     mapbutt.setBothFrames = function(icon1, icon2){
  456.       var bw = Window_Base._iconWidth, bh = Window_Base._iconHeight;
  457.       this.setColdFrame(icon1%16*bw, Math.floor(icon1/16)*bh, bw, bh);
  458.       this.setHotFrame(icon2%16*bw, Math.floor(icon2/16)*bh ,bw, bh);
  459.     }
  460.  
  461.     /**
  462.      * DMV.Sprite.MapButton.prototype.callClickHandler();
  463.      * Calls the function associated with this button.
  464.      */
  465.     mapbutt.callClickHandler = function() {
  466.       var funk = $gameSystem.mapButtonFunk(this._map_butt_id);
  467.       if (funk) { Function(funk).apply(this, arguments) };
  468.     };
  469.  
  470.     /**
  471.      * DMV.Sprite.MapButton.prototype.update();
  472.      * Updates this button and ensures the visibility, x, and y
  473.      * values for the sprite are also updated accordingly.
  474.      */
  475.     var update = mapbutt.update;
  476.     mapbutt.update = function() {
  477.       update.apply(this, arguments);
  478.       this.visible = $gameSystem.mapButtonVisible(this._map_butt_id);
  479.       this.x = $gameSystem.mapButtonX(this._map_butt_id);
  480.       this.y = $gameSystem.mapButtonY(this._map_butt_id);
  481.     };
  482.     /**
  483.      * End DMV.Sprite.MapButton.prototype declarations
  484.      */
  485.   })($.Sprite.MapButton.prototype);
  486.  
  487.  
  488.   /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  489.    * Spriteset_Map.prototype Variables && Functions
  490.    **//////////////////////////////////////////////
  491.   (function (sprmap) {
  492.     /**
  493.      * Spriteset_Map.prototype.createUpperLayer();
  494.      * Calls previous function definition and then creates
  495.      * all the menu buttons that should be shown on the map
  496.      */
  497.     var createUpper = sprmap.createUpperLayer;
  498.     sprmap.createUpperLayer = function() {
  499.       createUpper.apply(this, arguments);
  500.       this.createMapButtons();
  501.     };
  502.  
  503.     /**
  504.      * Spriteset_Map.prototype.createMapButtons();
  505.      * Adds all menu buttons that should be shown onto the spriteset.
  506.      */
  507.     sprmap.createMapButtons = function() {
  508.       this._mapButtons = [];
  509.       var button, funktn, x, y, i;
  510.       for (i=0; i < button_size; i++){
  511.         x = $gameSystem.mapButtonX(i);
  512.         y = $gameSystem.mapButtonY(i);
  513.         if (x != -1 && y != -1){
  514.           button = DMV.createMapButton(this, i);
  515.         }else{
  516.           button = false;
  517.         };
  518.         this._mapButtons.push(button);
  519.       };
  520.     };
  521.     /**
  522.      * End Spriteset_Map.prototype declarations
  523.      */
  524.   })(Spriteset_Map.prototype);
  525.  
  526.  
  527.   /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  528.    * Game_Temp.prototype Variables && Functions
  529.    **//////////////////////////////////////////
  530.   (function (temp) {
  531.     /**
  532.      * Game_Temp.prototype.map_buttons
  533.      * @return the maps buttons sprite array, if on the map of course.
  534.      */
  535.     $.reader(temp,'map_buttons', function(){
  536.       var a = SceneManager._scene._spriteset;
  537.       return $.isScene(Scene_Map) && a ? a._mapButtons : [];
  538.     });
  539.  
  540.     /**
  541.      * Game_Temp.prototype.setDestinationNotaButton()
  542.      * Ensures a button was not pressed at the current TouchInput x && y
  543.      * Called internally from within Game_Temp.setDestination();
  544.      * @return false if input was within the space of a button.
  545.      * @return true otherwise.
  546.      */
  547.     temp.setDestinationNotaButton = function(){
  548.       var bt, ix, iy;
  549.       var x = TouchInput.x;
  550.       var y = TouchInput.y;
  551.       var s = this.map_buttons.length;
  552.       for (var i = 0; i < s; i++){
  553.         bt = this.map_buttons[i];
  554.         ix = (x >= bt.x) && (x <= bt.x + bt.width);
  555.         iy = (y >= bt.y) && (y <= bt.y + bt.height);
  556.         if (ix && iy) {return false};
  557.       };
  558.       return true;
  559.     };
  560.  
  561.     /**
  562.      * Game_Temp.prototype.setDestination(x,y)
  563.      * Ensures a button is not pressed at the desired
  564.      * point and if not, allows the previous definition
  565.      * to be called which will make the player move.
  566.      */
  567.     var setDest = temp.setDestination;
  568.     temp.setDestination = function(x, y) {
  569.       if (this.setDestinationNotaButton()){
  570.         setDest.apply(this, arguments);
  571.       };
  572.     };
  573.     /**
  574.      * End Game_Temp.prototype declarations
  575.      */
  576.   })(Game_Temp.prototype);
  577.  
  578.  
  579.   /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  580.    * Game_System.prototype Variables && Functions
  581.    **////////////////////////////////////////////
  582.   (function (syst){
  583.     /**
  584.      * Game_System.prototype.initialize();
  585.      * Initializes the button data for the game
  586.      */
  587.     var initialize = syst.initialize;
  588.     syst.initialize = function() {
  589.       initialize.apply(this, arguments);
  590.       this.resetMapButtons();
  591.     };
  592.  
  593.     /**
  594.      * Game_System.prototype.resetMapButtons();
  595.      * Resets the button data for the game
  596.      */
  597.     syst.resetMapButtons = function(){
  598.       this._mapButtonDatas = [null];
  599.       this._mapButtonFunks = [null];
  600.       for (var i = 1; i <= button_size; i++) {
  601.         var string = 'Button ' + i + ' ';
  602.         this._mapButtonDatas.push($.mapParams2n(params[string+'Data']));
  603.         this._mapButtonFunks.push(params[string+'Func']);
  604.       };
  605.     };
  606.  
  607.     /**
  608.      * Game_System.prototype.isMapButt(id);
  609.      * @param id the button id to ensure is valid
  610.      * @return true or false, based on if button is valid
  611.      */
  612.     syst.isMapButt = function(id){
  613.       return id > 0 && id <= button_size;
  614.     };
  615.  
  616.     /**
  617.      * Game_System.prototype.mapButton(id);
  618.      * @param id the id of the button to get
  619.      * @return the button sprite if valid, else null
  620.      */
  621.     syst.mapButton = function(id) {
  622.       return this.isMapButt(id) ? $gameTemp.map_buttons[id] : null;
  623.     }
  624.  
  625.     /**
  626.      * Game_System.prototype.mapButtonX(id);
  627.      * @param id the id of the button to check
  628.      * @return the button's x position if valid, else -1
  629.      */
  630.     syst.mapButtonX = function(id){
  631.       return this.isMapButt(id) ? this._mapButtonDatas[id][0] : -1;
  632.     };
  633.  
  634.     /**
  635.      * Game_System.prototype.setMapButtonX(id, newX);
  636.      * @param id the id of the button to check
  637.      * @param newX the new x position to set for the button id
  638.      * @return buttons new y position if valid
  639.      * @return false if not valid button
  640.      */
  641.     syst.setMapButtonX = function(id, newX){
  642.       return this.isMapButt(id) ? this._mapButtonDatas[id][0] = newX : false;
  643.     };
  644.  
  645.     /**
  646.      * Game_System.prototype.mapButtonY(id);
  647.      * @param id the id of the button to check
  648.      * @return the button's y position if valid, else -1
  649.      */
  650.     syst.mapButtonY = function(id){
  651.       return this.isMapButt(id) ? this._mapButtonDatas[id][1] : -1;
  652.     };
  653.  
  654.     /**
  655.      * Game_System.prototype.setMapButtonY(id, newY);
  656.      * @param id the id of the button to check
  657.      * @param newY the new y position to set for the button id
  658.      * @return buttons new y position if valid
  659.      * @return false if not valid button
  660.      */
  661.     syst.setMapButtonY = function(id, newY){
  662.       return this.isMapButt(id) ? this._mapButtonDatas[id][1] = newY : false;
  663.     };
  664.  
  665.     /**
  666.      * Game_System.prototype.mapButtonIcon1(id);
  667.      * @param id the id of the button to check
  668.      * @return the button's cold icon id if valid, else 0
  669.      */
  670.     syst.mapButtonIcon1 = function(id){
  671.       return this.isMapButt(id) ? this._mapButtonDatas[id][2] : 0;
  672.     };
  673.  
  674.     /**
  675.      * Game_System.prototype.mapButtonIcon2(id);
  676.      * @param id the id of the button to check
  677.      * @return the button's hot icon id if valid, else 0
  678.      */
  679.     syst.mapButtonIcon2 = function(id){
  680.       return this.isMapButt(id) ? this._mapButtonDatas[id][3] : 0;
  681.     };
  682.  
  683.     /**
  684.      * Game_System.prototype.setMapButtonIcons(id, icon1, icon2);
  685.      * @param id the id of the button to change icons of
  686.      * @param icon1 the icon to use for the cold icon for this button
  687.      * @param icon2 the icon to use for the hot icon for this button
  688.      * @return true if button icons changed, false otherwise
  689.      */
  690.     syst.setMapButtonIcons = function(buttonID, icon1, icon2){
  691.       var button;
  692.       if (this.isMapButt(buttonID)){
  693.         this._mapButtonDatas[buttonID][2] = icon1;
  694.         this._mapButtonDatas[buttonID][3] = icon2;
  695.         if (button = this.mapButton(buttonID)){
  696.           button.setBothFrames(icon1, icon2);
  697.           return true;
  698.         }
  699.       }
  700.       return false;
  701.     };
  702.  
  703.     /**
  704.      * Game_System.prototype.mapButtonVisible(id);
  705.      * @param id the id of the button to check
  706.      * @return the button visibility flag if valid button, or false
  707.      */
  708.     syst.mapButtonVisible = function(id){
  709.       return this.isMapButt(id) ? this._mapButtonDatas[id][4] : false;
  710.     };
  711.  
  712.     /**
  713.      * Game_System.prototype.setMapButtonVisible(id, visiBool);
  714.      * @param id the id of the button to check
  715.      * @param visiBool the boolean to use to set this buttons visibility
  716.      */
  717.     syst.setMapButtonVisible = function(id, visiBool){
  718.       return this.isMapButt(id) ? this._mapButtonDatas[id][4] = visiBool : false;
  719.     };
  720.  
  721.     /**
  722.      * Game_System.prototype.mapButtonFunk(id);
  723.      * @param id the id of the button to check
  724.      * @return the buttons function string if valid, or false
  725.      */
  726.     syst.mapButtonFunk = function(id){
  727.       return this.isMapButt(id) ? this._mapButtonFunks[id] : false;
  728.     };
  729.  
  730.     /**
  731.      * Game_System.prototype.setMapButtonFunk(id, newFunkString);
  732.      * @param id the id of the button to change functions of
  733.      * @param newFunkString the new function string to use for button id
  734.      */
  735.     syst.setMapButtonFunk = function(id, newFunkString){
  736.       return this.isMapButt(id) ? this._mapButtonFunks[id] = newFunkString : false;
  737.     };
  738.     /**
  739.      * End Game_System.prototype declarations
  740.      */
  741.   })(Game_System.prototype);
  742.  
  743.  
  744.   /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  745.    * Scene Variables && Functions
  746.    **////////////////////////////
  747.  
  748.   /**
  749.    * [ private ] aliasSceneStart(sceneProto)
  750.    * Ensures the status window is refreshed upon scene start
  751.    * This fixes a bug where actors faces would not show.
  752.    */
  753.   function aliasSceneStart(sceneProto) {
  754.     var sceneProto_start = sceneProto.prototype.start;
  755.     sceneProto.prototype.start = function() {
  756.       sceneProto_start.apply(this, arguments);
  757.       if (this._statusWindow){
  758.         this._statusWindow.refresh();
  759.       };
  760.     };
  761.   };
  762.  
  763.   /**
  764.    * Scene_Status.prototype.start()
  765.    */
  766.   aliasSceneStart(Scene_Status);
  767.  
  768.   /**
  769.    * Scene_Equip.prototype.start()
  770.    * @note this has no effect unless using a custon script
  771.    *  that would show the actor face within equip scene
  772.    */
  773.   aliasSceneStart(Scene_Equip);
  774.  
  775.   /**
  776.    * Scene_Skill.prototype.start()
  777.    */
  778.   aliasSceneStart(Scene_Skill);
  779.  
  780.   /**
  781.    * End declarations
  782.    */
  783. })(DMV)
  784. /**
  785.  * End Plugin
  786.  * [url]www.dekyde.com[/url]
  787.  */

Lv1.梦旅人

梦石
0
星屑
65
在线时间
90 小时
注册时间
2007-8-14
帖子
25
2
 楼主| 发表于 2016-8-3 23:54:21 | 只看该作者
新人无人权呀
回复 支持 0 反对 1

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
90 小时
注册时间
2007-8-14
帖子
25
3
 楼主| 发表于 2016-8-10 15:32:23 | 只看该作者
单机版论坛

点评

我已经等了一周多啦=。=就吐槽下  发表于 2016-8-10 19:59
表示反对,问问题要有耐心  发表于 2016-8-10 18:08
回复 支持 0 反对 1

使用道具 举报

Lv2.观梦者

梦石
0
星屑
642
在线时间
165 小时
注册时间
2012-4-18
帖子
264
4
发表于 2016-12-9 21:48:15 | 只看该作者
时隔4个月的回答,说明现在论坛真的很冷,只有当我这种半新不新的人需要插件,自己有没法写出来,只能出来找的时候,才会看到萌新的辛酸,就想看当年的自己= =、
你这个问题,我才,应该是缺少DMV_Core,这个插件应该是需要和DMV_Core一起用,才能生效的吧。我猜的哟……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
帖子
359
5
发表于 2016-12-10 09:00:35 | 只看该作者
新人不新人的,不是做伸手党的理由。细心并不是只有老手才能具备的品质。发帖提问之前,你有仔细看过插件的内容吗?

有这几个月的时间去等待、去吐槽,难道不能回头看一下插件找找问题在哪儿吗?
回复 支持 2 反对 0

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-12-26 12:18

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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