Adding Gold Display to Window_MenuStatus

I'm still quite new to plugin development and I decided to make a few plugins of my own that probably already exist, but for learning purposes I decided to built them myself from scratch.

A problem I ran into with my FAE_SingleActorMenu.js plugin is that I can't get the Gold to display on screen where I want.

Quite simply, I want to make it appear in the status window alongside the HP/MP/TP when opening the menu.

I've already successfully added the experience to level to this window, but $partyGold() doesn't use an index parameter, and I think that's why it won't appear when I added it.

Link to download the plugin, if you want to see the entire thing:

Additional notes: This plugin was built primarily for one of my own projects, and the blank space in the Window_ExtraStatus is intentional, as it's used by another plugin of mine (FAE_ExtraCurrencies.js; also a work in progress)

I think I understand part of the problem, but I don't know how to get around it: Window_MenuStatus requires the index parameter which $gameParty.gold() doesn't have, and I think that's the source of the issue (please correct me if I'm wrong)

Also, for future reference - should I do it this way (linking the plugin) or provide the code here in the forums? Didn't want anyone staring at a wall of code without context so I figured this was the best way to handle it.

Thanks in advance for any help and advice. I've had a guardian angel helping me out, but he only recently discovered RPG Maker MV, so his 4 years of JavaScript knowledge are somewhat less impressive since he still doesn't know where all the data is saved. (Also, he's going on vacation today, so I won't be able to bug him for a few days lol)
I think I understand part of the problem, but I don't know how to get around it: Window_MenuStatus requires the index parameter which $gameParty.gold() doesn't have, and I think that's the source of the issue (please correct me if I'm wrong)
Wrong. Why would that be relevant?
You have your dimensions set up wrong.

Code:
Window_MenuStatus.prototype.drawCurrentGoldInfo = function(gold, x, y) {
    var gold = $gameParty.gold();
    this.drawCurrencyValue(gold, TextManager.currencyUnit, x, y, (Graphics.boxWidth - 36) / 3);
  }
This function accepts x and y.
It receives an x parameter of Graphics.boxWidth * 0.7 when it's called.
However, the width of the drawn text is (Graphics.boxWidth - 36) / 3.
Now since the window probably is not fullscreen width, that means that since the gold text is aligned right (you can find in drawCurrencyValue), it simply gets drawn off the canvas, in other words not at all.

Instead of Graphics.boxWidth you should use this.width * whatever for the text x and (this.width - 2* this.padding) * whatever for width. Maybe you'd also like to watch my tutorial series on youtube, you can find the first two parts in my signature, but currently there are four parts there.
The Window_MenuStatus has been stretched to the full width of the game window, so Graphics.boxWidth should be fine, right?

All of the menu windows have been adjusted in this custom menu plugin. Sorry for not clarifying in the first post.

Line 91 of the plugin changes the MenuStatus width to equal Graphics.boxWidth

There are 3 windows in view when the menu is opened - Commands, MenuStatus, and my new window ExtraStatus; the Gold window was removed because I had intended for the gold to be displayed in the ExtraStatus window initially, but have since decided that ExtraStatus would be used for a secondary plugin (currently, the aforementioned ExtraCurrencies is using that space, but could be swapped out for other extensions as I develop them)

All that having been said, I have tried your suggestion and the result was the same as my previous attempts:
Spoiler: Screenshot
okql8h
Screenshot_1.jpg
I have drawn a test text using the dev tools.
Using the equation from the plugin, I was short almost two full letters.
Screenshot_65.png

You need to decrease the x coord.
Odd, considering the To Next Level works perfectly with the same X value. But that did it.

Thank you for the replies.

Still, I'm curious as to why your previous suggested didn't work. :/

Ah well, this case is closed, and I see no reason why the thread shouldn't follow suit. Mods?
It was the same, since the window was full screen. That's why it didn't work.

Original thread: https://forums.rpgmakerweb.com/threads/adding-gold-display-to-window_menustatus.111500/