GMS 2 scaling inventory manu with room? [solved]

Discussion in 'Programming' started by Bladebss, Jun 13, 2019 at 3:43 PM.

  1. Bladebss

    Bladebss Member

    Joined:
    Apr 8, 2018
    Posts:
    28
    so, I have a menu in game that has many pages and just one of the pages is loaded when the player is at sea.
    Each page is a separate object that is created or destroyed as the player moves between pages.


    when they are not at sea they can scroll through the menu and see the equipment, then weapons then items, etc and the one for at sea is your boat cargo, but when at sea its the only menu available.

    I have code that just loads that page when I'm in the room for the sea and press the menu key(space), however the room for sea, is way bigger than the rest of the rooms on land, and so is the view, so the menu is really small!

    Im trying to work out how I can have the menu be much bigger to fit the view at sea. I have a load of stuff in the draw event of the boat inventory to tell it where to display the stuff based on x,y coordinates, so if I change the sprite scale of the menu all the menu items will be all squashed up in a tiny box on the top left of the screen still.

    is there a way to upscale every thing together?
    or
    would it be easier to just have a specific, larger and re jigged x,y coordinates, version of the boat inventory, that loads at sea instead. I have a feeling it will look different if I do this however as the pixel density will show and a lot of the text will be smoother?
     
  2. Sk8dududu

    Sk8dududu Member

    Joined:
    Aug 14, 2017
    Posts:
    188
    If it's just 1 object you can have it check if you're "at sea" (in the room that you're referring to), and then if it is, image_xscsle = a;
    Image_xscsle = image_xscsle;
    And for any drawing events use draw_sprite_ext, you can set the scale of the sprite using that function.
     
  3. Bladebss

    Bladebss Member

    Joined:
    Apr 8, 2018
    Posts:
    28
    thanx you sk8dududu! draw_sprite_ext was the answer to many of my problems! I had no idea it existed or what I could do with it. so helpful
     
    Sk8dududu likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice