• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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

20
Posts
11
Years
    • Seen Sep 11, 2022
    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

    • Items Page Trouble
      Not what I want.png
      64.2 KB · Views: 7
    • Items Page Trouble
      Not what I want 2.png
      67.7 KB · Views: 7
    1,682
    Posts
    8
    Years
    • Seen today
    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.
     
    20
    Posts
    11
    Years
    • Seen Sep 11, 2022
    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

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