Change Window Color - the frame

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
826
Reaction score
346
Primarily Uses
What I'm looking to do might not be possible, but I'd thought I'd throw it out to people who are more familiar with MV and javascript than me.


By default, when you use "Change Window Color" to change the tone of a windowskin, it only appears to change the background color and not the frame. For the purposes of what I'm trying to do, I would need the frame to change as well. All the tone stuff appears to be in the Window class which either I can't access or I don't know where to find it. Any help or guidance would be appreciated.


Windowskin:





Example:





Bigger:




Somewhat related: Any clue what's causing the mutilation of the right side of the window? I'm using Yanfly Message Core and Extended Message Pack 1 to achieve the text-sized window.
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,600
Reaction score
2,360
First Language
French
Primarily Uses
@Yatothe window class is in RPG Core "Window" it's a class who behavior if I remember ALMOST like the sprite classes 


Window.prototype._createAllParts = function() {
this._windowSpriteContainer = new PIXI.DisplayObjectContainer();
this._windowBackSprite = new Sprite();
this._windowCursorSprite = new Sprite();
this._windowFrameSprite = new Sprite(); // <-- it's what you need to setup : it's called as a sprite.
this._windowContentsSprite = new Sprite();
this._downArrowSprite = new Sprite();
this._upArrowSprite = new Sprite();
this._windowPauseSignSprite = new Sprite();
this._windowBackSprite.bitmap = new Bitmap(1, 1);
this._windowBackSprite.alpha = 192 / 255;
this.addChild(this._windowSpriteContainer);
this._windowSpriteContainer.addChild(this._windowBackSprite);
this._windowSpriteContainer.addChild(this._windowFrameSprite);
this.addChild(this._windowCursorSprite);
this.addChild(this._windowContentsSprite);
this.addChild(this._downArrowSprite);
this.addChild(this._upArrowSprite);
this.addChild(this._windowPauseSignSprite);
};


here the code who actually show the reasoning I'm trying to tell you : 


SO you can actually chan ge the opacity of it AND the color like it's was a regular sprite //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif 


if you are still confused check how they handle the change of tone for the back here the code //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif 


/**
* Changes the color of the background.
*
* @method setTone
* @param {Number} r The red value in the range (-255, 255)
* @param {Number} g The green value in the range (-255, 255)
* @param {Number} b The blue value in the range (-255, 255)
*/
Window.prototype.setTone = function(r, g, b) {
var tone = this._colorTone;
if (r !== tone[0] || g !== tone[1] || b !== tone[2]) {
this._colorTone = [r, g, b];
this._refreshBack();
}
};


if you are still confused I will gladly check a more in dept look in that c:
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
826
Reaction score
346
Primarily Uses
Perfect. That pointed me in exactly the right spot for the first problem. I don't know why I skipped over rpg_core when I was looking for all the base files. Our game now includes one tinted frame //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif


The second problem is probably related to the plugins in question, so I'll do some digging into that myself and post in the appropriate area if I can't find the source/a solution. Indeed. The second problem was a lack of rounding issue where the program was trying to draw the window a fraction of a pixel wide. That appears to also be fixed.
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,600
Reaction score
2,360
First Language
French
Primarily Uses
Perfect. That pointed me in exactly the right spot for the first problem. I don't know why I skipped over rpg_core when I was looking for all the base files. Our game now includes one tinted frame //rmwforums.s3.amazonaws.com/emoticons/default_smile.gif


The second problem is probably related to the plugins in question, so I'll do some digging into that myself and post in the appropriate area if I can't find the source/a solution.
you are welcome c: 


I know you are still getting used to JS since I know you are pure ruby programmer. but think that MOST all the code in MV are just like Ace one so the logics is almost the sames.


if you need any helps don't hesit to pm me for any question about JS c: 
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Well... it’s been a real pain in the IRS today. :/
My kitty still young (3-4 months), I think I could teach her some funny tricks... like: "Play dead-ly good music for my games"
Here's a quality DPS class idea: The Beekeeper, who uses the "Bees!!" skill to attack and poison enemies.
Please don't create long, boring cutscenes in which characters do nothing but stand around talking.
What if I took a lesson from Half Minute Hero? Let the player get dumb powerful each area, but reset them down to just slightly stronger than before for the next map?

Forum statistics

Threads
94,271
Messages
919,524
Members
123,990
Latest member
bartzfact0r
Top