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

Project1

 找回密码
 注册会员
搜索
楼主: xjzsq
打印 上一主题 下一主题

[原创发布] [教程]RMMV脚本教程——菜单美化(一)

[复制链接]

Lv5.捕梦者

梦石
0
星屑
29150
在线时间
604 小时
注册时间
2014-7-18
帖子
729

开拓者

11
 楼主| 发表于 2019-11-16 03:31:16 | 只看该作者
759782518 发表于 2019-11-8 09:40
大佬,那个原生汉化脚本如何使用?
直接放js里?

那个原生汉化脚本是用来辅助我们理解mv中原生js代码的,并不是放到游戏里的插件。

点评

大佬,能私信下联系方式吗...我没私信权限  发表于 2019-11-17 11:53
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
32
在线时间
6 小时
注册时间
2019-11-25
帖子
14
12
发表于 2019-11-26 23:12:22 | 只看该作者
谢谢楼主,希望还能发布更多的教程~~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
229
在线时间
41 小时
注册时间
2019-12-29
帖子
5
13
发表于 2019-12-30 01:30:50 | 只看该作者
交作业,真的就是照抄Window_Gold:
JAVASCRIPT 代码复制
  1. Window_Gold.prototype.refresh = function() {
  2.     var x = this.textPadding();
  3.     var width = this.contents.width - this.textPadding() * 2;
  4.     this.contents.clear();
  5.     this.drawIcon(313, 0, 0);
  6.     this.drawCurrencyValue(this.value(), this.currencyUnit(), x, 0, width);
  7. };
  8.  
  9.  
  10. var iconIndex = [208, 64, 137, 84, 75, 242, 229, 82];
  11. Window_MenuCommand.prototype.drawItem = function(index) {
  12.     var rect = this.itemRectForText(index);
  13.     var align = this.itemTextAlign();
  14.     this.resetTextColor();
  15.     this.changePaintOpacity(this.isCommandEnabled(index));
  16.     this.drawIcon(iconIndex[index],rect.x,rect.y);
  17.     this.drawText(this.commandName(index), rect.x+36, rect.y, rect.width, align);
  18. };
  19.  
  20.  
  21. Scene_Menu.prototype.create = function() {
  22.     //场景菜单基础 创建 呼叫(this)
  23.     Scene_MenuBase.prototype.create.call(this);
  24.     //创建命令窗口()
  25.     this.createCommandWindow();
  26.     //创建金钱窗口()
  27.     this.createGoldWindow();
  28.     //创建状态窗口()
  29.     this.createStatusWindow();
  30.  
  31.     this.createStepWindow();
  32. };
  33. Scene_Menu.prototype.createStepWindow = function() {
  34.     //金钱窗口 = 新 窗口金钱(0,0)
  35.     this._StepWindow = new Window_Step(0, 0);
  36.     //金钱窗口 y = 图形 盒高 - 金钱窗口 高
  37.     this._StepWindow.y = Graphics.boxHeight - this._StepWindow.height*2;
  38.     //添加窗口(金钱窗口)
  39.     this.addWindow(this._StepWindow);
  40. }
  41.  
  42.  
  43. function Window_Step() {
  44.     this.initialize.apply(this, arguments);
  45. }
  46.  
  47.  
  48. Window_Step.prototype = Object.create(Window_Base.prototype);
  49.  
  50. Window_Step.prototype.constructor = Window_Step;
  51.  
  52.  
  53. Window_Step.prototype.initialize = function(x, y) {
  54.     var width = this.windowWidth();
  55.     var height = this.windowHeight();
  56.     Window_Base.prototype.initialize.call(this, x, y, width, height);
  57.     this.refresh();
  58. };
  59.  
  60. Window_Step.prototype.windowWidth = function() {
  61.     return 240;
  62. };
  63.  
  64. Window_Step.prototype.windowHeight = function() {
  65.     return this.fittingHeight(1);
  66. };
  67.  
  68. Window_Step.prototype.refresh = function() {
  69.     var x = this.textPadding();
  70.     var width = this.contents.width - this.textPadding() * 2;
  71.     this.contents.clear();
  72.     this.drawIcon(176, 0, 0);
  73.     this.drawCurrencyValue(this.value(), this.currencyUnit(), x, 0, width);
  74. };
  75.  
  76. Window_Step.prototype.value = function() {
  77.     return $gameParty.steps();
  78. };
  79.  
  80. Window_Step.prototype.currencyUnit = function() {
  81.     return 's';
  82. };

点评

作业好评!就是图标选择的有点迷  发表于 2019-12-30 16:37
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
582
在线时间
8 小时
注册时间
2019-11-11
帖子
9
14
发表于 2020-8-10 09:55:47 | 只看该作者
盖楼
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1561
在线时间
114 小时
注册时间
2020-4-7
帖子
118

极短23参与

15
发表于 2020-10-25 21:41:02 | 只看该作者
萌新表示学废了
为了更好的明天加油奋斗!


支持我【关于p1论坛音乐区の复兴计划】戳
关 于  音  乐  区  の  复  兴  计  划  (不管你懂不懂音乐都可以点进来)
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1561
在线时间
114 小时
注册时间
2020-4-7
帖子
118

极短23参与

16
发表于 2020-10-25 21:47:48 | 只看该作者
博丽内奥拉 发表于 2019-12-30 01:30
交作业,真的就是照抄Window_Gold:

大大写的程序是有bug吗,技能和装备界面打不开

点评

我觉得大概是你把装备的键值写错了,应该是不会影响正常使用的  发表于 2020-11-25 20:46
为了更好的明天加油奋斗!


支持我【关于p1论坛音乐区の复兴计划】戳
关 于  音  乐  区  の  复  兴  计  划  (不管你懂不懂音乐都可以点进来)
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
17
在线时间
43 小时
注册时间
2021-1-2
帖子
23
17
发表于 2021-9-4 05:36:42 | 只看该作者
66666666666666
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
115
在线时间
48 小时
注册时间
2020-8-15
帖子
33
18
发表于 2021-9-4 09:33:30 | 只看该作者
感谢大佬分享
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
25
在线时间
3 小时
注册时间
2021-9-11
帖子
2
19
发表于 2021-9-17 17:38:34 | 只看该作者
收藏了,感谢大佬分享
ee
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
95
在线时间
11 小时
注册时间
2021-8-29
帖子
6
20
发表于 2021-10-9 12:40:10 | 只看该作者
很不错,感谢楼主
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-26 07:39

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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