[Semi-Solved] Adding Bust Image to My Own Menu Layout

Discussion in 'Javascript/Plugin Support' started by Niekitty, Apr 16, 2019.

  1. Niekitty

    Niekitty Warper Member

    Messages:
    4
    Likes Received:
    0
    Location:
    Two weeks from everywhere.
    First Language:
    English
    Primarily Uses:
    N/A
    Let me just say up front that I am NOT a skilled coder, and have no formal training in Javascript. I'm learning, but slowly, given how different it is from other languages I do know a bit more of (and how often answers I get to questions conflict with one another).

    That out of the way, I have a menu layout I'm building specifically for a project, but discovered - rather to my aggravation - that I have no clue how to place an image into the menu (I think I just heard heads hitting desks).
    I have tried looking through other alt-menu plugins and can't quite wrap my head around enough of what I'm looking at to even figure out what part of the code is placing the images, and the few times I've asked for help in different places, everybody just essentially tells me to forget using my own layout, and just use Galv's Bust Menu... which... would be nice, but for one thing, it's not the layout look I'm going for, and for another, I'm trying to design the menu for a single character game (no other party members). ...plus, I'd kinda like to actually LEARN something from this...

    So far I have the following for a Status panel setup; rigged to accommodate a character bust of 260x530 pixels. (I have the screen resolution set up as 1280x768; thus some of the non-MV-standard coordinates)
    Code:
    /* MENU STATUS PANEL SETUP*/
    // ...how the hecky do I stick a bust in place of the portrait?
    Window_MenuStatus.prototype.drawItemStatus = function(index) {
        var actor = $gameParty.members()[index];
        var rect = this.itemRect(index);
        var x = rect.x + 292;
        var y = rect.y + 16;
        var width = rect.width - x - this.textPadding();
        var lineHeight = this.lineHeight();
        var width2 = 256/*Math.min(200, width - 180 - this.textPadding())*/;
        this.contents.fontSize = 50; //make actor name larger
        this.drawActorName(actor, x, y);
        this.resetFontSettings() // other text normal size
        this.drawActorIcons(actor, x, y + lineHeight * 2);
        this.drawActorClass(actor, x, y + lineHeight * 1);
        this.drawActorHp(actor, x, y + lineHeight * 3, width2);
        this.drawActorMp(actor, x, y + lineHeight * 4, width2);
    };

    At The Moment I don't need the protagonist's portrait to be variable. It would be NICE to eventually change the portrait with her equipped shell/heart (she's a golem), but not necessary. Right now, I just want to know how to replace that friggen' portrait with an image. XD

    Sorry if this is a facepalm-worthy question...

    EDIT: Managed to get a bit of a hatchet job to work over the course of a few days. The image doesn't load the first time the menu opens, but opens properly every time afterward.
     
    Last edited: Apr 29, 2019
    #1

Share This Page