Moghunter Menu Spacing Help

Discussion in 'Javascript/Plugin Support' started by Catog, Nov 8, 2018.

  1. Catog

    Catog Professional Internal Screamer Veteran

    Messages:
    50
    Likes Received:
    12
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey all, just wondering if I could get some help?

    I'm using Moghunter's SceneMenu script, and I'm just running into some problems when it comes to loading up the "LayoutStatus" png. When I load it for only one character, it's perfectly center. But when I open up a second and third party member, this happens...

    2 Members:
    [​IMG]

    3 Members:
    [​IMG]


    Ideally, the menu should look something like this:
    [​IMG]

    ------
    I don't need much help, just someone to point out to me which things I have to edit in Notepad++ in order to decrease the space between each LayoutStatus box.

    Many thanks!

    - Caleb
     
    #1
  2. zaraku

    zaraku Time Keeper Member

    Messages:
    27
    Likes Received:
    23
    First Language:
    English
    Primarily Uses:
    RMMV
    Code:
    MCharStatus.prototype.posX = function() {
       var space = Math.floor((Graphics.boxWidth - 32) / this._maxMembers);
        return 16 + (space / 2) + (space * this._index);
    };
    
    Might have something to do with it. There's a very similar function for MBustMenu but I don't know which one you'll have to edit.
     
    #2
  3. Catog

    Catog Professional Internal Screamer Veteran

    Messages:
    50
    Likes Received:
    12
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah, I thought it might be, but I'm not sure what value to change. Nothing I'm doing with that seems to be working.
     
    #3
  4. zaraku

    zaraku Time Keeper Member

    Messages:
    27
    Likes Received:
    23
    First Language:
    English
    Primarily Uses:
    RMMV
    I just tested this real quick:
    Code:
    MCharStatus.prototype.posX = function() {
        var space = Math.floor((Graphics.boxWidth - 32) / this._maxMembers) / 2;
        return 300 + (space / 2) + (space * this._index);
    };
    Dividing space by 2 decreases the width significantly, and I changed the 16 after "return" to an arbitrary number like 300 because it shifted the layout to a weird spot. It seems to have moved them for me, anyway.

    Just replace the division number and 16 with whatever numbers that you see fit; unfortunately I can't cook up a more elegant solution. You have to do this for both MCharStatus and MBustMenu also.
     
    #4
    Catog likes this.
  5. Catog

    Catog Professional Internal Screamer Veteran

    Messages:
    50
    Likes Received:
    12
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Ah, see, that was my main problem! I didn't know there was an MBustMenu function I needed to look at too.

    That was perfect! Thank you so so much <3
     
    #5
    zaraku likes this.
  6. zaraku

    zaraku Time Keeper Member

    Messages:
    27
    Likes Received:
    23
    First Language:
    English
    Primarily Uses:
    RMMV
    Haha glad it worked out!
     
    #6

Share This Page