Show an inventory object in the middle of the screen

Started by dcalap, Sat 30/11/2019 20:59:40

Previous topic - Next topic

dcalap

Hi,

Let's say I have a photo in my inventory and I want to show this photo in the middle of the screen in real size when the player looks at the inventory item.

How can I do this? What is the best way to do that?

Thanks!

Cassiebsg

I can think of a couple ways, the best way I can't say.

You can use a dynamic sprite and show it in the middle of the screen.
You can use a GUI and show the image in it.
Some other solution I'm not thinking of?

Anyway, use whichever serves your purposes. I would most likely use a GUI, but that may not be the "best" solution.
There are those who believe that life here began out there...

Crimson Wizard

Quote from: Cassiebsg on Sat 30/11/2019 21:45:19
You can use a dynamic sprite and show it in the middle of the screen.

Note, you cannot "just" show a sprite, you need to place it on something, so probably you meant object or overlay?

IMHO GUI is the good first option, because a) it does not depend on room, b) it gives you bit more control than overlay. If that does not work for some reason, then look for other alternatives.


eri0o

If you are going to have many different photos, you can use the same GUI and make a function for showing it that receives a sprite, so you apply it either to it's background or a button.

Also a reminder that this function exists:

https://adventuregamestudio.github.io/ags-manual/GUI.html#guicentre

SMF spam blocked by CleanTalk