MV Need help with Icon drawing

I want my game's main menu to display the basic controls like this-
Problem1.png

It wasn't until I finished putting together my item scene that I realized that I'm unsure of how to get the same results that I got with the main menu. I need to be able to draw icons into the backing of the item scene, that also change depending on a condition. The farthest I got with looking into it is maybe using drawTextEx, but I'm not sure how I'd implement that or the conditional.

I should add, I'm using Moghunters menu plugins for like 90% of the menu (Scene_Item, Scene_Equip, Scene_Status, Scene_Skill)

Would really appreciate any assistance.
if you want the draw icon to flip, you might be able to create a new icon
for that with the specific width (which I done for my one of my own plugins.)

I don't know if any of the menu is modified and for which plugin the
"accept" and "back" is.

position it based on those 2 commands can be relative easy to add.

so here is 2 basic functions
JavaScript:
    Window_NAMEHERE.prototype.drawIcon = function(iconIndex, x, y) {
        const bitmap = ImageManager.loadPicture("ICONSHEET");
        const pw = 36;
        const ph = 36;
        const sx = iconIndex % 2 * pw;
        const sy = Math.floor(iconIndex / 2) * ph;
        this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
    };

    Window_NAMEHERE.prototype.processDrawIcon = function(iconIndex, textState) {
        this.drawIcon(iconIndex, textState.x + 2, textState.y + 2);
        textState.x += Window_Base._iconWidth + 4;
    }

the drawIcon size is 36x36, width/2 so 72pixel width).

then call it above or below the drawTextEx:
this.drawIcon(iconId, x, y) (do this on both accept and back)
for accept its iconId 1, for back, iconId 2 of the custom sheet.
which is placed inside pictures folder.
if you want the draw icon to flip, you might be able to create a new icon
for that with the specific width (which I done for my one of my own plugins.)

I don't know if any of the menu is modified and for which plugin the
"accept" and "back" is.

position it based on those 2 commands can be relative easy to add.

so here is 2 basic functions
JavaScript:
    Window_NAMEHERE.prototype.drawIcon = function(iconIndex, x, y) {
        const bitmap = ImageManager.loadPicture("ICONSHEET");
        const pw = 36;
        const ph = 36;
        const sx = iconIndex % 2 * pw;
        const sy = Math.floor(iconIndex / 2) * ph;
        this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
    };

    Window_NAMEHERE.prototype.processDrawIcon = function(iconIndex, textState) {
        this.drawIcon(iconIndex, textState.x + 2, textState.y + 2);
        textState.x += Window_Base._iconWidth + 4;
    }

the drawIcon size is 36x36, width/2 so 72pixel width).

then call it above or below the drawTextEx:
this.drawIcon(iconId, x, y) (do this on both accept and back)
for accept its iconId 1, for back, iconId 2 of the custom sheet.
which is placed inside pictures folder.
Ok, I definitely didn't give a very good explanation of what I what, or what my problem was.

1755510554951.png


This is what my main menu looks like "in-game". It uses an actual map rather than the usual Scene_Menu. The actual text that labels the controls are part of the background image, seen here.

1755510738438.png


For this screen specifically I used SRD_HudMaker to place the icons in the desired spots. But when the player chooses the ITEM command and presses "Z" or the "A" button, it will bring them to Scene_Item like base menu. The problem is that HudMaker only works on maps or in battle, so I can't just easily place the icons.

1755511095808.png


My (half-baked) idea was, just like the main screen, have the "controls" text be apart of the backing image, while the icons themselves would be "active" elements. After doing some light research I was reminded that in the core script, "drawText" doesn't parse for escape codes, but "drawTextEx" does.

So my main issue is I don't know if there's anyway to, while the Item scene is intializing, to place these icons in their desired places on the screen, while also changing what icon appears, depending on a boolean value.

Sorry I didn't communicate that well, like at all.
that explained a lot as this is crucial if you leave out "important stuff"
like HUDMaker.

SRD_HUDMaker is powerful to check booleans (either by switch or variable value).
advanced coding might be required to follow this index, but if the accept/back
are placed elsewhere, you could make a function to alter the background,
as well for a value to track them.

I didn't use SRD_HUDMaker for menu's like this.

there is a plugin called around: GraphicalDesign that can drag windows to
different positions for each scene (which might be easier to use) to keep
the accept/back different.

you can make different background based on scene (there is altMenuScene3)
which allows that (there is an issue, which there are patch to make it right).

this way, the placement of the buttons can be set correctly probably.
maybe with minimal modification to the MOG hunter plugin(s).

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-icon-drawing.179622/