Good day RPG makers,
I'm working on a script (one I posted but needs fixing) and I have everything working except for one thing.
What would make it easy for me to calculate is if I can find the cursor position (index position) as it relates to the list in the window.
What I mean is like this -> scene shop
item 1
item 2
item 3
------------------ #<- top of window border
item 4
item 5
item 6 # <- cursor is here
item 7
item 8
item 9
item 10
item 11
item 12
item 13
item 14
------------------- # <- bottom of window border
item 15
item 16
item 17
when checking the index you get 5, but I want it to return 2. Since it's in the third slot of the window list.
I can't seem to find a way to get this.
The default code just uses the index position and types in the text, but if I use this then I would have my results below the bottom of the screen for items that have an index higher than 11 (window list size - (page row max))
How it adjusts the y positioning for when the list moves, I can't figure out. Since y position is 408 for item 17 which would be below the window bottom, but the code (somewhere) says display on row 11 (where item 14 is).
Advice?
*Update. Figured it out.
I didn't realize that top_row was an awesome function.
I'm working on a script (one I posted but needs fixing) and I have everything working except for one thing.
What would make it easy for me to calculate is if I can find the cursor position (index position) as it relates to the list in the window.
What I mean is like this -> scene shop
item 1
item 2
item 3
------------------ #<- top of window border
item 4
item 5
item 6 # <- cursor is here
item 7
item 8
item 9
item 10
item 11
item 12
item 13
item 14
------------------- # <- bottom of window border
item 15
item 16
item 17
when checking the index you get 5, but I want it to return 2. Since it's in the third slot of the window list.
I can't seem to find a way to get this.
The default code just uses the index position and types in the text, but if I use this then I would have my results below the bottom of the screen for items that have an index higher than 11 (window list size - (page row max))
How it adjusts the y positioning for when the list moves, I can't figure out. Since y position is 408 for item 17 which would be below the window bottom, but the code (somewhere) says display on row 11 (where item 14 is).
Advice?
*Update. Figured it out.
I didn't realize that top_row was an awesome function.