查看: 4699|回复: 5

[已经解决] 有辦法變量一直顯示在右上角或左上角嗎?

[复制链接]
梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
发表于 2016-1-11 20:53:36 | 显示全部楼层 |阅读模式

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

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

×
如提~{:2_248:}
梦石
0
星屑
80
在线时间
386 小时
注册时间
2007-7-27
回帖
4075

开拓者

发表于 2016-1-11 21:11:27 | 显示全部楼层
吸吸
回复

使用道具 举报

梦石
0
星屑
60
在线时间
306 小时
注册时间
2014-8-5
回帖
403
发表于 2016-1-11 22:15:40 | 显示全部楼层
本帖最后由 夏末渐离 于 2016-1-12 12:59 编辑

1.png
手头刚好有个现成的,在此吐槽下:最近新人都这样。注意要【善于搜索】。
  1. /*:
  2. * @author XMJL
  3. * @param Window_Width
  4. * @default 200
  5. *
  6. * @param Window_Height
  7. * @default 100
  8. *
  9. * @param Opacity
  10. * @default 255
  11. *
  12. * @param Var_Id
  13. * @default 1
  14. *
  15. * @param ContentsX
  16. * @default 0
  17. *
  18. * @param ContentsY
  19. * @default 10
  20. *
  21. * @param Contents
  22. * @default var_value:
  23. */
  24. (function()
  25. {
  26.     var parameters = PluginManager.parameters('Window_disposeVarValue');
  27.     var mywidth=Number(parameters['Window_Width']);
  28.     var myheight=Number(parameters['Window_Height']);
  29.     var VariableId=Number(parameters['Var_Id']);
  30.     var opacityValue=Number(parameters['Opacity']);
  31.     var contents=parameters['Contents'];
  32.     var contentsX=Number(parameters['ContentsX']);
  33.     var contentsY=Number(parameters['ContentsY']);
  34.     var Scene_Map20160104=Scene_Map.prototype.createAllWindows;
  35.     Scene_Map.prototype.createAllWindows=function()
  36.     {
  37.         Scene_Map20160104.call(this);
  38.         this.addChild(new Window_disposeVarValue());
  39.     }

  40.     function Window_disposeVarValue(){
  41.         this.initialize.apply(this, arguments);
  42.     }
  43.     Window_disposeVarValue.prototype = Object.create(Window_Base.prototype);
  44.     Window_disposeVarValue.prototype.constructor = Window_disposeVarValue;
  45.     Window_disposeVarValue.prototype.initialize = function() {
  46.         Window_Base.prototype.initialize.call(this, 0, 0, mywidth, myheight);
  47.         this.opacity = opacityValue;
  48.         this.refresh();
  49.     };

  50.     Window_disposeVarValue.prototype.VarValue=function()
  51.     {
  52.         var value=$gameVariables.value(VariableId);
  53.         this.oldValue=value;
  54.         return value;
  55.     }
  56.     Window_disposeVarValue.prototype.refresh=function()
  57.     {
  58.         if($gameVariables.value(VariableId)!=this.oldValue)
  59.         {
  60.             this.contents.clear();
  61.             this.drawText(contents+this.VarValue(),contentsX,contentsY);
  62.         }
  63.     }
  64.     Window_disposeVarValue.prototype.update=function()
  65.     {
  66.         this.refresh();
  67.     }

  68. })();
复制代码

点评

或许能用到。先mark住了。  发表于 2016-1-12 08:54
  点我进入    
       ↓      
回复

使用道具 举报

梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
 楼主| 发表于 2016-1-11 23:55:18 | 显示全部楼层
夏末渐离 发表于 2016-1-11 22:15
手头刚好有个现成的,在此吐槽下:最近新人都这样。注意要【善于搜索】。 ...

怎麼控制要顯示哪幾個?{:2_248:}

点评

回炉重造0x0  发表于 2016-1-12 12:56
drawText 还是一个挺耗时间的函数,实在不建议每帧调用一次  发表于 2016-1-12 06:41
好歹让人自定义一下 var_value: 那个字符串吧... 每帧重绘是闹哪样... 赋值后面别忘了加分号(虽然这里没问题,但最好加一下。我被坑过TAT)  发表于 2016-1-12 06:39
插件管理器 Var_Id 。只能显示1个变量的值  发表于 2016-1-12 00:19
回复

使用道具 举报

笑问情缘

梦石
0
星屑
68
在线时间
238 小时
注册时间
2006-5-3
回帖
544
发表于 2016-1-12 14:18:04 来自手机 | 显示全部楼层
为什么我用了,变量和窗口都不显示出来?
回复

使用道具 举报

梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
 楼主| 发表于 2016-1-12 16:13:03 | 显示全部楼层
夏末渐离 发表于 2016-1-11 22:15
手头刚好有个现成的,在此吐槽下:最近新人都这样。注意要【善于搜索】。 ...

用這個插件卡的蛋疼 甚麼原因阿{:2_276:}

点评

没觉得卡啊……  发表于 2016-1-12 16:26
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部