• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Items Page Trouble

  • 22
    Posts
    12
    Years
    • Seen Jun 30, 2024
    Recently I took on a screen resizing project for my game and so far its been going pretty well. I have ran into a bit of a snag and I was hoping for some direction. I'm trying to slide the items and the quantity over to one side but so far everything I've tried has resulted in the text being moved over and cut off at the edge.
    I have been working in this bit of code UI_Bag. Specifically dealing with rect:
    Spoiler:

    But as the images show I haven't been entirely successful and I would love some guidance on how to get my ideal setup.
     

    Attachments

    • [PokeCommunity.com] Items Page Trouble
      Not what I want.png
      64.2 KB · Views: 7
    • [PokeCommunity.com] Items Page Trouble
      Not what I want 2.png
      67.7 KB · Views: 7
    So, you want to right align the text? you'll want to edit the textpos arrays then.
    [@adapter.getDisplayName(item),rect.x,rect.y-2,false,baseColor,shadowColor] like this is the code that draws the item name at rect.x, rect.y-2 (2 higher than where rect.y actually is) and sets it to left aligned (false). true or 1 makes it right aligned, relative to the x and y point you have set.
    you'll have to play with the numbers some, but that's the spot.
     
    That's not quite it, at least not from what I've tried. I'm still getting similar results. So there seems to be a viewing box where the text is written and every time I try and edit the position of the text, it moves successfully but the viewing box itself doesn't move.
     

    Attachments

    • [PokeCommunity.com] Items Page Trouble
      Not what I want 3.png
      77 KB · Views: 1
    • [PokeCommunity.com] Items Page Trouble
      Not what I want 4.png
      72.5 KB · Views: 1
    Back
    Top