Creating Custom Menu - Is what I want possible

Discussion in 'Javascript/Plugin Support' started by Jimminybob, Mar 4, 2018.

  1. Jimminybob

    Jimminybob Villager Member

    Messages:
    24
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi,

    I've been trying to look through the code to create a custom menu for my game, and while I get some of it, there is a lot that I can't understand. I've tried installing some custom menu plugins but i've found that they still keep to the same general look and feel of the meny, mostly just with a different layout. So I was wondering if what I want from my menu is possible and if it is then if someone could point me in the right direction to get started with it.

    [​IMG]
    [​IMG]
    [​IMG] [​IMG]
    Hopefully above this you'll see a couple of mockups for what i'd like it to look like. So the whole thing will be laid out like a book, with tabs down the left hand side acting as the menu commands. In the above picture, for items, the list of items would go down the left page and the description etc would be on the right. On a side note, is it possible to use items without having to select an actor to use them on? Because in my game it wouldn't make sense to use items on actors.

    And the second mockup is just for the options where it shows the option items down the left hand page.

    So is something like this possible? If so can someone help me with where to begin or point me in the direction of similar examples?

    Many Thanks
     
    #1
    King Gerar and cji3bp62000 like this.
  2. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,790
    Likes Received:
    9,477
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    A menu like this is not that different from other menus. Different layout, a background image and transparent windows, but other than that it's pretty much the same as any other menu out there. It is very possible and it's no rocket science. In terms of basic window manipulation perhaps SRD's and Soulpour's tutorial could help you.
    And in the worst case you can always handle it via eventing.
     
    #2
    cji3bp62000 likes this.
  3. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,632
    Likes Received:
    2,937
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Do you know how to code in Javascript?

    This is pretty simple once you know how to code. It's a background sprite and opacity = 0 windows. Shouldn't be too long to learn.
     
    #3
    cji3bp62000 likes this.
  4. Jimminybob

    Jimminybob Villager Member

    Messages:
    24
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    I just assumed that this would be fairly difficult to achieve, but thankfully it sounds like it may not be the case. I do know some Javascript, but nothing quite as complicated as this. Will check out some of the tutorials mentioned.
     
    #4
    King Gerar likes this.
  5. Jimminybob

    Jimminybob Villager Member

    Messages:
    24
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    So i've managed to make some real good progress on my menu, but there are still a handful of bits that I was wondering if you could help with:

    Adding new scene type but disabling until switch is on

    I want to have an option on the menu that shows a map for the player via images that I've made and will show when the "Map" menu item is selected. I tried to add these in via the code below:

    Scene_Map.prototype.create = function(){
    this.showMapImages();
    };

    Scene_Map.prototype.showMapImages = function(){
    this._Map1Image = new Sprite();
    this._Map1Image.bitmap = ImageManager.loadPicture('FloorplanA');
    this._Map2Image = new Sprite();
    this._Map2Image.bitmap = ImageManager.loadPicture('FloorplanB');
    this.addChild(this._Map1Image);
    };

    But when that is added the game gets stuck when loading in, just saying "Now Loading" on screen. So I think i'm missing something with adding in a new scene. Also I have it so the player needs to examine a place on the map to "obtain" the map, so I want the menu item to be disabled until the switch is turned on for examining this location, but I can't see how to do it.

    Removing border and background from windows

    This should be simple but I just can't seem to do it. The default menu comes with everything in windows with background opacity and borders. How can I turn these off so that it's all just blank with just the text.

    Moving Item description/Help to right hand side

    I want to have it so that the item list is on the left hand side and the help window where it says the item description is on the right. But the help window doesn't seem to have it's own create function from what i've seen, instead being rolled into the category window functions. How can i move and resize that window so it's placed to the right of the screen?

    Changing the font, only on menu?

    Finally, and this is more of a query than anything, because i'm not sure its possible from what I've seen. But is it possible to change the font for the menu, but only the menu and not the whole game?

    If anyone could help me with these then I would really appreciate it.

    Thanks
     
    #5
  6. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,632
    Likes Received:
    2,937
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Infinite Loading: Due probably to the game note finding the resources.

    Removing border and background: Change the opacity property: this.opacity = 0;

    Moving stuffs: Couple points. Just to tell you, since I always make my custom menus, I completely forgot how the default one looks, or is even programmed.
    1) To move windows in a scene, just locate where it is create and change the positions. How a window is usually create is: new Window(x, y, width ,height). You can easily modify the position and the size.
    2) If you can't find where it is create (like in the help window case), it is probably created through a method that was inherited from a mother class (don't know how you call these in javascripts). Check the Scene_MenuBase, you might find some methods that were carried over to your scene.

    Changing the font in menu only:
    Although I suppose you could do this manually for every window in the Menu, that would be too much work for nothing. The best way to have done that was to create a mother class (or mother function or whatever it is called in java script) for all the windows in the menu and setting the font in that function.
     
    #6

Share This Page