MZ back button offset (in battle only)

Hello my awesome community that I love so much and that has helped me so much throughout the years, happy new years to everyone! I have having the following problem, if someone could help me out I would greatly appreciate it 😀.

While in battle I have the back button that is in the way of the turn order display. The turn order display has settings to get moved around to the left or to the right or to where ever but I don't like to work around my problems. the UI needs to look the way it is in my imagination and not by the limits of the engine. Even without plugins that button kinda just floats wherever it wants during battle depending on the resolution so I think this could help many other poeple too 🙂.
Please and thank you <3.

Kindly Thenerdmansion.


-Plugin request: Ability to offset back-button to where ever for the battle scene only.

Screenshot 2025-01-05 123500.png
Normally the battle's Touch UI back button is positioned immediately below the help area. This is to avoid overlapping with the help window, used to display skill/item descriptions.

Plugin suggestions (untested):
  • To move the button to a specific, constant location on screen:
    Spoiler: plugin code A
    JavaScript:
    /*:
     * @target MZ
     * @plugindesc Move the Touch UI back button on the battle scene (constant).
     * @author Caethyril
     * @url https://forums.rpgmakerweb.com/threads/174445/
     * @help Free to use and/or modify for any project, no credit required.
     */
    ;void (alias => {
      // Patch - move button to top-left of UI Area.
      Scene_Battle.prototype.createCancelButton = function() {
        alias.apply(this, arguments);
        const b = this._cancelButton;
        b.x = 4;
        b.y = 4;
      };
    })(Scene_Battle.prototype.createCancelButton);
  • To move the button to the top of the UI Area when the help window is not visible:
    Spoiler: plugin code B
    JavaScript:
    /*:
     * @target MZ
     * @plugindesc Move the Touch UI back button on the battle scene (adaptive).
     * @author Caethyril
     * @url https://forums.rpgmakerweb.com/threads/174445/
     * @help Free to use and/or modify for any project, no credit required.
     */
    ;void (alias => {
      // Patch - refresh button position every frame based on help visibility.
      Scene_Battle.prototype.updateCancelButton = function() {
        alias.apply(this, arguments);
        const b = this._cancelButton;
        if (b?.visible)
          b.y = this._helpWindow?.visible ? this.helpAreaBottom() : 4;
      };
    })(Scene_Battle.prototype.updateCancelButton);
OHHHHHH!!!!! They both work!!! This is exactly what I needed. I also prefer how it looks when the button just moves around when the help window is on but then moves back to the top when help window gone so I went with the second option that you provided. Thank you so much!!! You are so amazing and a blessing on this community!!!!! Amazing, amazing, AMAZING!!!! 😀!!
Great! Happy RPG Making~ 👋

Original thread: https://forums.rpgmakerweb.com/threads/back-button-offset-in-battle-only.174445/