Move the pause indicator on Galv's Message Styles

Discussion in 'Javascript/Plugin Support' started by Hahasea, Aug 16, 2019.

  1. Hahasea

    Hahasea Veteran Veteran

    Messages:
    85
    Likes Received:
    12
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm not too keen on the right aligned pause indicator that Galv's Message Styles makes all text boxes default to, but I can't quite figure out how to change it back to middle aligned.
    upload_2019-8-16_17-0-50.png

    I'm pretty sure it's in this bit here in the js:
    upload_2019-8-16_17-1-36.png

    I already tried altering
    this._windowPauseSignSprite.anchor.x = 0;
    however while this moves the pause icon, it does so in pixels, so when the boxes are different widths the location is varied. Using a % breaks the code.

    It seems I need to change where the anchor is set, back to the default rpgmaker bottom middle of boxes, but I can't figure out how to do that? Any idea?
     
    Last edited: Aug 16, 2019
    #1
  2. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,786
    Likes Received:
    9,468
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Programming works the same, regardless if it's rpg maker or an actual programming language.
    Using % breaks the code, because % is the operator for modulus. If you want to move a to the middle of b, you want to set its x to the middle of the message window. By default that's done through
    b.x = (a.width - b.width) / 2
     
    #2

Share This Page