Removing "HP/MP" labels (on 2 specific windows)

Hello! First post here.

Basically, thanks to a plugin ATT_Turan created in the past, I was FINALLY able to get what I wanted: Have RMMZ display HP and MP including the max values - not just the current ones. Now, when I was testing with higher values to see how things would play out, I realized that it caused the HP and MP labels to get overlapped by the numerical values. Its the only (major) UI issue I have left to iron out. Here's my question!


Is it possible to have the mention of HP & MP (the letters only) specifically disabled on the MAGIC and STATUS screens only? Keeping the num. values, obviously. To better show what I mean, I included two screenshots. If possible, I would like to avoid using Visu.S. plugins (personal preference). Thank you.
I think this should work.

Note that should you decide to use Visustella Skills and States Core in the future, this will need to be done inside the plugin parameters.

JavaScript:
const CnD_Sprite_Gauge_label = Sprite_Gauge.prototype.label ;
Sprite_Gauge.prototype.label = function() {
    if(SceneManager._scene instanceof Scene_Menu) {
    return "";
    } else {
    return CnD_Sprite_Gauge_label.call(this);
    }
};
I think this should work.

Note that should you decide to use Visustella Skills and States Core in the future, this will need to be done inside the plugin parameters.

JavaScript:
const CnD_Sprite_Gauge_label = Sprite_Gauge.prototype.label ;
Sprite_Gauge.prototype.label = function() {
    if(SceneManager._scene instanceof Scene_Menu) {
    return "";
    } else {
    return CnD_Sprite_Gauge_label.call(this);
    }
};
Strangely enough, it kept the labels ("HP" and "MP") on the Status and Magic screen but erased it on the Main Menu. 😩
Strangely enough, it kept the labels ("HP" and "MP") on the Status and Magic screen but erased it on the Main Menu. 😩
Reverse the order of the return statements in the code you were given.
Reverse the order of the return statements in the code you were given.
Wasn't sure I did it right... BUT IT WORKS!! Thank you so much, both of you. 😍
Strangely enough, it kept the labels ("HP" and "MP") on the Status and Magic screen but erased it on the Main Menu. 😩
Sorry, reading comprehension failed me lol.

Thanks @Trihan

If you want to fine tune it further it’s a matter of tweaking with what scenes the labels will be rendered.

Original thread: https://forums.rpgmakerweb.com/threads/removing-hp-mp-labels-on-2-specific-windows.176276/