楼主: xjzsq

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

[复制链接]
梦石
2
星屑
34497
在线时间
614 小时
注册时间
2014-7-18
回帖
647

MZ评测员开拓者

 楼主| 发表于 2019-11-16 03:31:16 | 显示全部楼层
759782518 发表于 2019-11-8 09:40
大佬,那个原生汉化脚本如何使用?
直接放js里?

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

点评

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

使用道具 举报

梦石
0
星屑
32
在线时间
6 小时
注册时间
2019-11-25
回帖
14
发表于 2019-11-26 23:12:22 | 显示全部楼层
谢谢楼主,希望还能发布更多的教程~~
回复

使用道具 举报

梦石
0
星屑
229
在线时间
41 小时
注册时间
2019-12-29
回帖
3
发表于 2019-12-30 01:30:50 | 显示全部楼层
交作业,真的就是照抄Window_Gold:
[pre lang="javascript"]

Window_Gold.prototype.refresh = function() {
    var x = this.textPadding();
    var width = this.contents.width - this.textPadding() * 2;
    this.contents.clear();
    this.drawIcon(313, 0, 0);
    this.drawCurrencyValue(this.value(), this.currencyUnit(), x, 0, width);
};


var iconIndex = [208, 64, 137, 84, 75, 242, 229, 82];
Window_MenuCommand.prototype.drawItem = function(index) {
    var rect = this.itemRectForText(index);
    var align = this.itemTextAlign();
    this.resetTextColor();
    this.changePaintOpacity(this.isCommandEnabled(index));
    this.drawIcon(iconIndex[index],rect.x,rect.y);
    this.drawText(this.commandName(index), rect.x+36, rect.y, rect.width, align);
};


Scene_Menu.prototype.create = function() {
    //场景菜单基础 创建 呼叫(this)
    Scene_MenuBase.prototype.create.call(this);
    //创建命令窗口()
    this.createCommandWindow();
    //创建金钱窗口()
    this.createGoldWindow();
    //创建状态窗口()
    this.createStatusWindow();

    this.createStepWindow();
};
Scene_Menu.prototype.createStepWindow = function() {
    //金钱窗口 = 新 窗口金钱(0,0)
    this._StepWindow = new Window_Step(0, 0);
    //金钱窗口 y = 图形 盒高 - 金钱窗口 高
    this._StepWindow.y = Graphics.boxHeight - this._StepWindow.height*2;
    //添加窗口(金钱窗口)
    this.addWindow(this._StepWindow);
}


function Window_Step() {
    this.initialize.apply(this, arguments);
}


Window_Step.prototype = Object.create(Window_Base.prototype);

Window_Step.prototype.constructor = Window_Step;


Window_Step.prototype.initialize = function(x, y) {
    var width = this.windowWidth();
    var height = this.windowHeight();
    Window_Base.prototype.initialize.call(this, x, y, width, height);
    this.refresh();
};

Window_Step.prototype.windowWidth = function() {
    return 240;
};

Window_Step.prototype.windowHeight = function() {
    return this.fittingHeight(1);
};

Window_Step.prototype.refresh = function() {
    var x = this.textPadding();
    var width = this.contents.width - this.textPadding() * 2;
    this.contents.clear();
    this.drawIcon(176, 0, 0);
    this.drawCurrencyValue(this.value(), this.currencyUnit(), x, 0, width);
};

Window_Step.prototype.value = function() {
    return $gameParty.steps();
};

Window_Step.prototype.currencyUnit = function() {
    return 's';
};[/pre]

点评

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

使用道具 举报

梦石
0
星屑
583
在线时间
8 小时
注册时间
2019-11-11
回帖
6
发表于 2020-8-10 09:55:47 | 显示全部楼层
盖楼
回复

使用道具 举报

梦石
0
星屑
1574
在线时间
114 小时
注册时间
2020-4-7
回帖
99

极短23参与

发表于 2020-10-25 21:41:02 | 显示全部楼层
萌新表示学废了
为了更好的明天加油奋斗!


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

使用道具 举报

梦石
0
星屑
1574
在线时间
114 小时
注册时间
2020-4-7
回帖
99

极短23参与

发表于 2020-10-25 21:47:48 | 显示全部楼层
博丽内奥拉 发表于 2019-12-30 01:30
交作业,真的就是照抄Window_Gold:

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

点评

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


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

使用道具 举报

梦石
0
星屑
17
在线时间
43 小时
注册时间
2021-1-2
回帖
23
发表于 2021-9-4 05:36:42 | 显示全部楼层
66666666666666
回复

使用道具 举报

梦石
0
星屑
115
在线时间
48 小时
注册时间
2020-8-15
回帖
30
发表于 2021-9-4 09:33:30 | 显示全部楼层
感谢大佬分享
回复

使用道具 举报

梦石
0
星屑
25
在线时间
3 小时
注册时间
2021-9-11
回帖
2
发表于 2021-9-17 17:38:34 | 显示全部楼层
收藏了,感谢大佬分享
ee
回复

使用道具 举报

梦石
0
星屑
95
在线时间
11 小时
注册时间
2021-8-29
回帖
5
发表于 2021-10-9 12:40:10 | 显示全部楼层
很不错,感谢楼主
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部