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

Project1

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

[原创发布] 绿皮党的地图多窗口显示数据法子(必须全图并行)

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2851
在线时间
446 小时
注册时间
2016-9-26
帖子
1222
跳转到指定楼层
1
发表于 2021-10-20 04:54:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
◆脚本:Window_MapName.prototype.drawBackground1 = function(x, y, width, height) {
:  :    var color1 = 'rgba(200, 0, 0, 0.5)';
:  :    var color2 = 'rgba(200, 0, 0, 0.5)';
:  :    this.contents.gradientFillRect(x, y, width / 2, height, color2, color1);
:  :    this.contents.gradientFillRect(x + width / 2, y, width / 2, height, color1, color2);
:  :};
◆脚本:Window_MapName.prototype.drawBackground2 = function(x, y, width, height) {
:  :    var color1 = 'rgba(0, 0, 200, 0.5)';
:  :    var color2 = 'rgba(0, 0, 200, 0.5)';
:  :    this.contents.gradientFillRect(x, y, width / 2, height, color2, color1);
:  :    this.contents.gradientFillRect(x + width / 2, y, width / 2, height, color1, color2);
:  :};
◆脚本:Window_MapName.prototype.drawBackground3 = function(x, y, width, height) {
:  :    var color1 = 'rgba(100, 0, 100, 1)';
:  :    var color2 = 'rgba(0, 100, 0, 0.2)';
:  :    this.contents.gradientFillRect(x, y, width / 2, height, color2, color1);
:  :    this.contents.gradientFillRect(x + width / 2, y, width / 2, height, color1, color2);
:  :};
◆脚本:Window_MapName.prototype.windowWidth = function() {
:  :    return Graphics.boxWidth;
:  :};
:  :
:  :Window_MapName.prototype.windowHeight = function() {
:  :    return Graphics.boxHeight;
:  :};
◆脚本:Window_MapName.prototype.refresh = function() {
:  :    this.contents.clear();
:  :var width = Graphics.boxWidth*0.2;var iconBoxWidth = Window_Base._iconWidth + 4;
:  :var textHeight = 0;  this.changeTextColor(this.textColor(1));  this.drawBackground1(48*0, textHeight, width, this.lineHeight());  this.drawIcon(0, 48*0, textHeight, iconBoxWidth, 'left');  this.drawText("我是猪", iconBoxWidth+48*0, textHeight, width-iconBoxWidth, 'left');
:  :textHeight += this.lineHeight();  this.changeTextColor(this.textColor(30));  this.drawBackground2(48*1, textHeight, width, this.lineHeight());  this.drawIcon(1, 48*1, textHeight, iconBoxWidth, 'left');  this.drawText("我也是猪", iconBoxWidth+48*1, textHeight, width-iconBoxWidth, 'left');   
:  :textHeight += this.lineHeight();  this.changeTextColor(this.textColor(18));  this.drawBackground2(48*2, textHeight, width, this.lineHeight());this.drawIcon(3, 48*2, textHeight, iconBoxWidth, 'left');  this.drawText("我也也是猪猪猪猪猪猪", iconBoxWidth+48*2, textHeight, width-iconBoxWidth, 'left');   
:  :};
:  :        
◆脚本:Window_MapName.prototype.close = function() {
:  :
:  :};
:  :
:  :Window_MapName.prototype.updateFadeIn = function() {
:  :    this.contentsOpacity = 255;
:  :};
:  :Window_MapName.prototype.updateFadeOut = function() {
:  :};
◆脚本:Scene_Base.prototype.popScene = function() {
:  :    SceneManager.pop();
:  :$gameTemp.reserveCommonEvent(350);
:  :};
◆注释:最后一段的350是指运行事件350,
:  :而这个事件具体就是执行原地传送一次。

Lv3.寻梦者

梦石
0
星屑
2851
在线时间
446 小时
注册时间
2016-9-26
帖子
1222
2
 楼主| 发表于 2021-10-20 04:57:15 | 只看该作者
本帖最后由 任小雪 于 2021-10-20 04:58 编辑

绿皮党的地图多窗口显示数据法子(必须全图并行,用了后,原先的地图名称显示效果回废弃掉),具体就自己多尝试吧,就不多注释了。
里面的数据,大多跟(数据索引,x轴位置,y轴位置,该项目显示文本的宽,该项目显示文本的高)这种格式差不多,
然后,draw这东西大致就是那些文本和图标,对了,this.textColor(1)这里面的“1”,调成其他数字就可以是其他颜色的(上限好像只有32种)
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2851
在线时间
446 小时
注册时间
2016-9-26
帖子
1222
3
 楼主| 发表于 2021-10-20 05:03:55 | 只看该作者
本帖最后由 任小雪 于 2021-10-20 06:20 编辑

话说,哪位大佬知道有不原地传送的法子(goto和push的法子虽然没试过,但总感觉不行,唔,睡完再试吧,电脑关机了,天亮了)(绿皮真的不懂啊)。
对了,还有那种显示文字的框框怎么搞(能搞到小号的那种),只能索引图标加p图(或者四条背景填充色?)吗。
唔……虽然是显示了很多行,但其实只有一个框呢,这是遗憾,唔
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
6935
在线时间
709 小时
注册时间
2021-3-5
帖子
814
4
发表于 2021-10-20 13:58:37 | 只看该作者
只有代码没有图片吗

另外,绿皮党是什么意思啊

点评

运行一次就知道效果了,脚本这东西,要大家一起慢慢摸索的,这只是个范例  发表于 2021-10-20 14:31
代码把“:”去掉其实就可以直接用了,懂的都懂  发表于 2021-10-20 14:30
自造的词汇:用于定义不懂各种语言全靠翻译俺寻思  发表于 2021-10-20 14:30
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2851
在线时间
446 小时
注册时间
2016-9-26
帖子
1222
5
 楼主| 发表于 2021-10-22 04:06:36 | 只看该作者
◆脚本:Window_MapName.prototype.initialize = function() {
:  :    var wight = this.windowWidth();
:  :    var height = this.windowHeight();
:  :    Window_Base.prototype.initialize.call(this, 0, 0, wight, height);
:  :    this.opacity = 0;
:  :    this.contentsOpacity = 0;
:  :    this._showCount = Infinity;
:  :    this.refresh();
:  :};

点评

加上这段(看着别人的贴子灵光一闪)后,我现在是SceneManager.goto(Scene_Map);和“原地传送”结合实际情况交替用了  发表于 2021-10-22 04:08
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-29 20:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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