Resolution and Inventory GUI trouble (SOLVED)

Started by TheRoger, Thu 11/03/2010 09:58:41

Previous topic - Next topic

TheRoger

I wanted to test how inventory GUI works with more than 10 item. And guess what? It doesn't work correctly... I'm using 9-verb MI-style template and script in it...

This is what I got, I press Down button, inventory items that are more to 10 appears for a part of second and then goes back again, I don't know what prob is. I got it when I changed screen resolution to 800x600. It looks like this:

http://www.youtube.com/watch?v=QMbek378G3c

Khris

That's sort of a bug in the template.

The template's code checks continuously whether there's an inv item at coordinates 180;160 and if there isn't, scrolls the inventory one line back up.
The best way to rectify this is to rewrite the code to adjust the coordinates based on resolution and position of the GUI.

For now though you can change the coordinates to be in the middle of the first inv item field.
They are set in lines 106 & 107 in guiscript.ash.

I'll notify abstauber.

TheRoger

It worked  ;D How did I missed that whole tab? Well thank you anyway, you saved my game and my time

abstauber

Hey Guys,
here's the "patch" ;)

around line 1371 in guiscript.asc

change from
Code: ags

if (InventoryItem.GetAtScreenXY(inv_xpos, inv_ypos)==null) MainInv.TopItem-=inv_items_row;


to
Code: ags

if (InventoryItem.GetAtScreenXY(gMaingui.X+MainInv.X+1, gMaingui.Y+MainInv.Y+1)==null) MainInv.TopItem-=inv_items_row;



Thanks for reporting! Maybe I should add a short high-res section to the manual.

Cheers!

SMF spam blocked by CleanTalk