Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: MZ Windows screen Picture layer?
- Original author: muge
- Original date: February 10, 2022
- Source thread: https://forums.rpgmakerweb.com/threads/windows-screen-picture-layer.144815/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript
Summary
I want background < windos < pictrueView attachment 215837 I've been trying for a long time and my head is about to explode I don't know how to change the correct layer addWindow addChild addChildToBack addInnerChild this.addChildAt(child, containerIndex + 1); have tried
Archived First Post
I want background < windos < pictrueView attachment 215837
I've been trying for a long time and my head is about to explode
I don't know how to change the correct layer
addWindow addChild addChildToBack addInnerChild this.addChildAt(child, containerIndex + 1); have tried
The picture is always at the bottom
new Sprite( ImageManager.loadPicture('Night')) can not
Should I use the sprite's prototype
this.createLowerLayer() or this.createUpperLayer()?
I've been trying for a long time and my head is about to explode
I don't know how to change the correct layer
addWindow addChild addChildToBack addInnerChild this.addChildAt(child, containerIndex + 1); have tried
The picture is always at the bottom
new Sprite( ImageManager.loadPicture('Night')) can not
Should I use the sprite's prototype
this.createLowerLayer() or this.createUpperLayer()?
let st = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
st.call(this);
this.stCreateAll();
};
Scene_Base.prototype.stCreateAll = function() {
const rect = new this.wrect();
this.w1 = new w2(rect);
this.addChild(this.w1);
};
Scene_Base.prototype.wrect = function() {
const ww = 300;
const wh = 200;
const wx = 0;
const wy = 0;
return new Rectangle(wx, wy, ww, wh);
};
function w2() {
this.initialize(...arguments);
};
w2.prototype = Object.create(Window_Base.prototype);
w2.prototype.constructor = w2;
w2.prototype.initialize = function(rect) {
Window_Base.prototype.initialize.call(this, rect);
//this.opacity = 0;
this.createBackground();
this.refresh();
};
w2.prototype.refresh = function() {
this.contents.clear();
this.drawTextEx("this text EX",0,0);
};
w2.prototype.update = function() {
Window_Base.prototype.update.call(this);
this._backSprite1.origin.x += 1;
this._backSprite1.origin.y += 1;
this.refresh();
};
w2.prototype.createBackground = function () {
this._backSprite1 = new TilingSprite(
ImageManager.loadPicture('Night')
);
this._backSprite1.move(0, 0, 300, 200);
this._backSprite1.opacity = 125;
this.addChildToBack(this._backSprite1);
};
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...