MV Menu Scene Blur

Hey folks,

So I'm creating a custom menu scene in one of my plugins, but when I go to .push the scene, the background goes completely black instead of blurring.

Is there perhaps something that I am missing?

I'm using the standard structure so I figured the blurred background would follow through with the prototype.

function Levels_Menu() { this.initialize.apply(this, arguments); } Levels_Menu.prototype = Object.create(Scene_Base.prototype); Levels_Menu.prototype.constructor = Levels_Menu; Levels_Menu.prototype.initialize = function() { Scene_Base.prototype.initialize.call(this); }; Levels_Menu.prototype.create = function() { Scene_Base.prototype.create.call(this); this._titleWindow = new Title_Window(0, 0, Graphics.boxWidth, Graphics.boxHeight / 6); this.addChild(this._titleWindow); } Levels_Menu.prototype.update = function() { if(!this.drawnWindows) { this._titleWindow.drawAllItems(); this.drawnWindows = true; } } function Title_Window() { this.initialize.apply(this, arguments); } Title_Window.prototype = Object.create(Window_Base.prototype); Title_Window.prototype.constructor = Title_Window; Title_Window.prototype.initialize = function(x, y, width, height) { Window_Base.prototype.initialize.call(this, x, y, width, height) this.drawAllItems(); } Title_Window.prototype.drawAllItems = function() { this.contents.clear(); this.drawText("Skill Levels", (Graphics.boxWidth / 2) - 100, (Graphics.boxWidth / 6) / 2, 200); }
Note that scenes are entirely separate containers, e.g. you're not seeing the map scene "behind" the pause menu, you're seeing a blurred snapshot of Scene_Map used as a background image for Scene_Menu.

Scene_Base does not render a background by default. You can add one to your scene's create method. For reference:
Spoiler: relevant core script excerpts (rpg_scenes.js)
JavaScript:
Scene_MenuBase.prototype.create = function() {
    Scene_Base.prototype.create.call(this);
    this.createBackground();
    this.updateActor();
    this.createWindowLayer();
};

Scene_MenuBase.prototype.createBackground = function() {
    this._backgroundSprite = new Sprite();
    this._backgroundSprite.bitmap = SceneManager.backgroundBitmap();
    this.addChild(this._backgroundSprite);
};
Note that scenes are entirely separate containers, e.g. you're not seeing the map scene "behind" the pause menu, you're seeing a blurred snapshot of Scene_Map used as a background image for Scene_Menu.

Scene_Base does not render a background by default. You can add one to your scene's create method. For reference:
Spoiler: relevant core script excerpts (rpg_scenes.js)
JavaScript:
Scene_MenuBase.prototype.create = function() {[/INDENT]
[INDENT]    Scene_Base.prototype.create.call(this);[/INDENT]
[INDENT]    this.createBackground();[/INDENT]
[INDENT]    this.updateActor();[/INDENT]
[INDENT]    this.createWindowLayer();[/INDENT]
[INDENT]};[/INDENT]
[INDENT][/INDENT]
[INDENT]Scene_MenuBase.prototype.createBackground = function() {[/INDENT]
[INDENT]    this._backgroundSprite = new Sprite();[/INDENT]
[INDENT]    this._backgroundSprite.bitmap = SceneManager.backgroundBitmap();[/INDENT]
[INDENT]    this.addChild(this._backgroundSprite);[/INDENT]
[INDENT]};
That worked perfectly thank you.

I figured since I was running with the prototype, the createBackground function would have run in unison with the added menu scene.
That worked perfectly thank you.
You're welcome! 😂
I figured since I was running with the prototype, the createBackground function would have run in unison with the added menu scene.
Your thinking is correct, but as I mentioned, Scene_Base doesn't do anything with backgrounds.

You could have your scene inherit from Scene_MenuBase or something instead, if that's more appropriate. In that case the blurred background should be inherited, i.e. you should not have to explicitly add it in your scene's code.
You're welcome! 😂

Your thinking is correct, but as I mentioned, Scene_Base doesn't do anything with backgrounds.

You could have your scene inherit from Scene_MenuBase or something instead, if that's more appropriate. In that case the blurred background should be inherited, i.e. you should not have to explicitly add it in your scene's code.
Managing the inheritance properties is always a nightmare lol. I'd rather spend the time to just rewrite it and enter it in =)

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/menu-scene-blur.134678/