Change Window Color - the frame

● ARCHIVED · READ-ONLY
Started by Yato 4 posts View original ↗
  1. 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:


    3J9CXI9.png


    Example:


    MXe3YfB.png


    Bigger:

    Spoiler
    rF2uHkk.png



    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.
  2. @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:
  3. 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.
  4. Yato said:
    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: