Having trouble figuring out formatting of what I'm trying to do. I could mess around with exact positioning until it's *just right*, but I'm trying to do it a little more elegantly, and running into issues.
Here's the basic layout (ignore all the images/text, it's placeholder just to make coding it easier - actually its just renders from my last game I'm using for now - which is another reason I don't want to use exact positioning, if I get it right now, I'll just have to redo a lot of it if I change things later on like the font, or certain images or whatever)
View attachment 2636575
The idea is it's just a shop layout - the numbers are the cost to purchase, you click the cart button to purchase. Right now I have everything set up in a grid, each element of the grid is a frame.
Grid 4 1:
frame:
stuffhere
I have 6 grids set up on that page: 2 for the image sets, (I could probably consilidate that down to 1, but I've been doing this one piece at a time so atm it's 2), and then 2 for the text, and 2 for the cart icons.
The main problem I'm having is the pricing - I want to place it centered under the image. I got everything where I wanted it, except... Once you purchase the item, the cart icon changes, and the number changes to say "SOLD!". This shifts everything around, so nothing is aligned anymore. I'm trying to figure out the best way to align everything so that it always stays perfectly aligned, regardless of the text. At first I tried removing the grid and just using hboxes for everything, but it didn't help at all with placement - every time the text changed, everything still shifted. (Image after purchasing one - with no other changes just to demonstrate the shift)
View attachment 2636577
It's obvious to me this is because of the change in the number of characters in the text - what's not obvious is how to get everything perfectly aligned, without manually entering positions, even when the number of characters change. So far various forms of hboxes, and xaligns, and even some limited manual positioning hasn't helped - though it's possible im setting it up wrong.
EDIT: nvm I figured it out
Here's the basic layout (ignore all the images/text, it's placeholder just to make coding it easier - actually its just renders from my last game I'm using for now - which is another reason I don't want to use exact positioning, if I get it right now, I'll just have to redo a lot of it if I change things later on like the font, or certain images or whatever)
View attachment 2636575
The idea is it's just a shop layout - the numbers are the cost to purchase, you click the cart button to purchase. Right now I have everything set up in a grid, each element of the grid is a frame.
Grid 4 1:
frame:
stuffhere
I have 6 grids set up on that page: 2 for the image sets, (I could probably consilidate that down to 1, but I've been doing this one piece at a time so atm it's 2), and then 2 for the text, and 2 for the cart icons.
The main problem I'm having is the pricing - I want to place it centered under the image. I got everything where I wanted it, except... Once you purchase the item, the cart icon changes, and the number changes to say "SOLD!". This shifts everything around, so nothing is aligned anymore. I'm trying to figure out the best way to align everything so that it always stays perfectly aligned, regardless of the text. At first I tried removing the grid and just using hboxes for everything, but it didn't help at all with placement - every time the text changed, everything still shifted. (Image after purchasing one - with no other changes just to demonstrate the shift)
View attachment 2636577
It's obvious to me this is because of the change in the number of characters in the text - what's not obvious is how to get everything perfectly aligned, without manually entering positions, even when the number of characters change. So far various forms of hboxes, and xaligns, and even some limited manual positioning hasn't helped - though it's possible im setting it up wrong.
EDIT: nvm I figured it out
Last edited by a moderator: