Hello!
I am in need of help building a calculator / formula in order to locate the x,y coordinates of graphics that will display on a screen interface. The graphics I will be placing require the upper left corner coordinates (i.e. where the graphic image begins).
The interface element is a popup within a larger screen, and can contain anywhere from 1 to 25 individual icons, placed in a series of rows. There is a maximum of 5 rows possible, therefore a maximum of 5 icons per row. Example, if there are 16 icons required, there would be 4 rows of icons - 3 full rows of icons and 1 row containing only 1 icon. If there were only 3 icons, there would be only one single row centered on the screen. All rows are required to be centered onscreen, i.e. - a row of 5 would appear wider than a row of 4 below it in the case of 9 icons.
Each icon carries the same dimensions (92 pixels wide x 66 pixels high).
The overall screen width is 800 pixels wide x 530 pixels high.
I am looking to develop a formula that can tell me what the x,y coordinates of each icon would be, based on the number of icons required in the particular popup.
I appreciate any insight into how best to approach this. I have created some formulas but none take into account how it would work beyond a single row. Thats where I am getting stuck.
I am in need of help building a calculator / formula in order to locate the x,y coordinates of graphics that will display on a screen interface. The graphics I will be placing require the upper left corner coordinates (i.e. where the graphic image begins).
The interface element is a popup within a larger screen, and can contain anywhere from 1 to 25 individual icons, placed in a series of rows. There is a maximum of 5 rows possible, therefore a maximum of 5 icons per row. Example, if there are 16 icons required, there would be 4 rows of icons - 3 full rows of icons and 1 row containing only 1 icon. If there were only 3 icons, there would be only one single row centered on the screen. All rows are required to be centered onscreen, i.e. - a row of 5 would appear wider than a row of 4 below it in the case of 9 icons.
Each icon carries the same dimensions (92 pixels wide x 66 pixels high).
The overall screen width is 800 pixels wide x 530 pixels high.
I am looking to develop a formula that can tell me what the x,y coordinates of each icon would be, based on the number of icons required in the particular popup.
I appreciate any insight into how best to approach this. I have created some formulas but none take into account how it would work beyond a single row. Thats where I am getting stuck.