MV Any way to change text box in Gab Window (YEP) plugin?

Apologies if there is a more appropriate forum to ask this on, I couldn't tell.

In any case, I was wondering if for Yanfly's Gab Window plugin there was some way to change the placement, width, height and character face display of the text box displayed. Here is an image showcasing how it currently appears (top) Vs. how I'd like it to look (bottom).

illusts.png


I also wonder if multiple lines of text are possible, but I can do without them.
Moved to Plugin Support
I have an extension plugin that lets you change the height/width of Yanfly's gab window. It changes the size of all gab windows equally, though; if you want some gabs to be a different size then I think you'll need a different solution.

My plugin is called "CaeX_YEPGabWindowExt" and can be found in the "Extension" spoiler here:
I have an extension plugin that lets you change the height/width of Yanfly's gab window. It changes the size of all gab windows equally, though; if you want some gabs to be a different size then I think you'll need a different solution.

My plugin is called "CaeX_YEPGabWindowExt" and can be found in the "Extension" spoiler here:
No, this is perfect, thank you so much for the reply! Now I just need to see if there is a way to put the window on the other side of the screen. May need to mess around.
[Edit 3: I've since updated CaeX_YEPGabWindowExt to v1.1, which has this stuff correctly implemented.]

Spoiler: original post
Oh, I see! My plugin doesn't have the option built in, but you could edit its code.

At this place in my code:
JavaScript:
	Window_Gab.prototype.initialize = function (battle) {
		_.Window_Gab_initialize.call(this, battle);				// Default
		let wx = this.x, wy = this.y, ww = this.width, wh = this.height;
		wh *= _.heightMult;							// Adjust
...you could try adding another line, to offset the X position based on the width multiplier:
JavaScript:
	Window_Gab.prototype.initialize = function (battle) {
		_.Window_Gab_initialize.call(this, battle);				// Default
		let wx = this.x, wy = this.y, ww = this.width, wh = this.height;
		wx = Graphics.boxWidth * _.backWidthMult;	// Offset X
		wh *= _.heightMult;							// Adjust

Edit: I just realised you'd want the face position to be changed, too. Um...OK, maybe try adding this code to the end of my plugin?
JavaScript:
// Patch - draw face on right.
;void (function(alias) {
  Window_Gab.prototype.drawGabCharacter = function() {
    if (this._graphicType === "face") {  // edit 2
      var h = this.contents.height;
      var w = Window_Base._faceWidth;  // edit 1
      var y = 0;
      var x = this.contents.width - w;
      this.drawFace(this._graphicName, this._graphicIndex, x, y, w, h);
    } else
      alias.apply(this, arguments);
  }
})(Window_Gab.prototype.drawGabCharacter);

// Patch - un-indent text-with-face.
void (function(alias) {
  _.gabTextX = function(win) {
    if (win._graphicType === "face")
      return win.standardPadding();
    else
      return alias.apply(this, arguments);
  };
})(_.gabTextX);

[Edit 1: corrected ImageManager._faceWidth to Window_Base._faceWidth. 😴]
[Edit 2: corrected this._graphicName === "face" to this._graphicType === "face". I wonder how many other typos there are?]
Oh, I see! My plugin doesn't have the option built in, but you could edit its code.

At this place in my code:
JavaScript:
    Window_Gab.prototype.initialize = function (battle) {
        _.Window_Gab_initialize.call(this, battle);                // Default
        let wx = this.x, wy = this.y, ww = this.width, wh = this.height;
        wh *= _.heightMult;                            // Adjust
...you could try adding another line, to offset the X position based on the width multiplier:
JavaScript:
    Window_Gab.prototype.initialize = function (battle) {
        _.Window_Gab_initialize.call(this, battle);                // Default
        let wx = this.x, wy = this.y, ww = this.width, wh = this.height;
        wx = Graphics.boxWidth * _.backWidthMult;    // Offset X
        wh *= _.heightMult;                            // Adjust

Edit: I just realised you'd want the face position to be changed, too. Um...OK, maybe try adding this code to the end of my plugin?
JavaScript:
// Patch - draw face on left.
;void (function(alias) {
  Window_Gab.prototype.drawGabCharacter = function() {
    if (this._graphicName === "face") {
      var h = this.contents.height;
      var w = ImageManager._faceWidth;
      var y = 0;
      var x = this.contents.width - w;
      this.drawFace(this._graphicName, this._graphicIndex, x, y, w, h);
    } else
      alias.apply(this, arguments);
  }
})(Window_Gab.prototype.drawGabCharacter);

// Patch - un-indent text-with-face.
void (function(alias) {
  _.gabTextX = function(win) {
    if (win._graphicType === "face")
      return win.standardPadding();
    else
      return alias.apply(this, arguments);
  };
})(_.gabTextX);
You're really a life saver! I'm probably wrong, but I don't think this is the first time you've swooped in to save the day when I made a silly post. :elswt: I was actually close to giving up changing the position the other day.
I can't thank you enough for the support, but I do have to say that while the textbox does move to the right side of the screen as expected, the face display does not, so the text overlaps it.
Screenshot_1.png

Like so.

Edit: If there is no way around it, the problem can be remedied by adding spaces to the text, but that may be a little troublesome.
Screenshot_2.png
😅 Oh, oops. I wrote ImageManager._faceWidth instead of Window_Base._faceWidth, in the "draw face on right" part. I've edited the code in my previous post, hopefully that'll work as intended now~
Hm... I'm fairly certain I didn't paste anything wrong and yet the character face still only appears on the left side of the textbox as opposed to the right.

I won't continue to push my luck though; you have been extremely helpful already (+ solved my main issue of the text box being on the left side of the screen) and as I mentioned, there's an easy though bothersome fix that I don't mind using. 🙂 Thanks again, cheers.
😅 Oh, oops. I wrote ImageManager._faceWidth instead of Window_Base._faceWidth, in the "draw face on right" part. I've edited the code in my previous post, hopefully that'll work as intended now~
My bad, I forgot to press the reply button and I don't think I can edit my previous post to add one, or delete it? So yeah.
I'm fairly certain I didn't paste anything wrong and yet the character face still only appears on the left side of the textbox as opposed to the right.
Oof. Looks like I also wrote _graphicName in a place that I should have written _graphicType. I made another edit to my earlier post in case you want to try it, but I haven't set up a project to test it on my end.

In case that doesn't work, this code is what changes the text indent:
JavaScript:
// Patch - un-indent text-with-face.
void (function(alias) {
  _.gabTextX = function(win) {
    if (win._graphicType === "face")
      return win.standardPadding();
    else
      return alias.apply(this, arguments);
  };
})(_.gabTextX);
Remove that and the indent should be back to normal~

My bad, I forgot to press the reply button and I don't think I can edit my previous post to add one, or delete it? So yeah.
Well, you could edit a reply into an existing post, but I don't think that would send a notification. No worries, though: I've got my account set up to watch any thread where I post (I think that's the default?).
Oof. Looks like I also wrote _graphicName in a place that I should have written _graphicType. I made another edit to my earlier post in case you want to try it, but I haven't set up a project to test it on my end.

In case that doesn't work, this code is what changes the text indent:

Remove that and the indent should be back to normal~


Well, you could edit a reply into an existing post, but I don't think that would send a notification. No worries, though: I've got my account set up to watch any thread where I post (I think that's the default?).
Ah, I was just making sure since it seems easy to disable that option.

Well, part of the reason I thought it would be fine to leave it the way it was, is because I feel a little bad about having to bug report.
Alas...
Screenshot_1.png

The face has now disappeared entirely, aha.
I thought "maybe this is an issue with my custom box width/height?" but no. In fact, when I reset those parameters the text box disappears entirely now. This must be tough...

I did put both solutions you presented in the same text file, maybe that is a problem?
No worries, I think I just missed another thing: the face was probably getting drawn off-screen. I should've actually tested earlier before posting suggestions, at least after my first mistake. Sorry about that! 😴

I've just updated CaeX_YEPGabWindowExt to v1.1, same link as before. The new version has some extra parameters, for X-alignment (left, middle, right) and face position (left/right). I ran some basic tests and it all seemed OK for me, so hopefully it'll work for you (and anyone else who wants it)~ 👋
No worries, I think I just missed another thing: the face was probably getting drawn off-screen. I should've actually tested earlier before posting suggestions, at least after my first mistake. Sorry about that! 😴

I've just updated CaeX_YEPGabWindowExt to v1.1, same link as before. The new version has some extra parameters, for X-alignment (left, middle, right) and face position (left/right). I ran some basic tests and it all seemed OK for me, so hopefully it'll work for you (and anyone else who wants it)~ 👋
Now this was unexpected, an entire new version! Everything seems to be working perfectly! Thank you so much for your help with my request. :yhappy:

Original thread: https://forums.rpgmakerweb.com/threads/any-way-to-change-text-box-in-gab-window-yep-plugin.177445/