Project1
标题:
绿皮党的地图多窗口显示数据法子(必须全图并行)
[打印本页]
作者:
任小雪
时间:
2021-10-20 04:54
标题:
绿皮党的地图多窗口显示数据法子(必须全图并行)
◆脚本: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,
: :而这个事件具体就是执行原地传送一次。
作者:
任小雪
时间:
2021-10-20 04:57
本帖最后由 任小雪 于 2021-10-20 04:58 编辑
绿皮党的地图多窗口显示数据法子(必须全图并行,用了后,原先的地图名称显示效果回废弃掉),具体就自己多尝试吧,就不多注释了。
里面的数据,大多跟(数据索引,x轴位置,y轴位置,该项目显示文本的宽,该项目显示文本的高)这种格式差不多,
然后,draw这东西大致就是那些文本和图标,对了,this.textColor(1)这里面的“1”,调成其他数字就可以是其他颜色的(上限好像只有32种)
作者:
任小雪
时间:
2021-10-20 05:03
本帖最后由 任小雪 于 2021-10-20 06:20 编辑
话说,哪位大佬知道有不原地传送的法子(goto和push的法子虽然没试过,但总感觉不行,唔,睡完再试吧,电脑关机了,天亮了)(绿皮真的不懂啊)。
对了,还有那种显示文字的框框怎么搞(能搞到小号的那种),只能索引图标加p图(或者四条背景填充色?)吗。
唔……虽然是显示了很多行,但其实只有一个框呢,这是遗憾,唔
作者:
RyanYe
时间:
2021-10-20 13:58
只有代码没有图片吗
另外,绿皮党是什么意思啊
作者:
任小雪
时间:
2021-10-22 04:06
◆脚本: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();
: :};
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1