Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: DiegoHolt on Tue 20/05/2025 20:41:37

Title: Tilted save/load screenshots
Post by: DiegoHolt on Tue 20/05/2025 20:41:37
Hi! :-D  Is there a way of making the images of the load/save screen tilted?

https://imgur.com/a/GHEnbBT (https://imgur.com/a/GHEnbBT)

(https://imgur.com/a/GHEnbBT)

The image is a example of what I'm trying to achieve. As you can see, I need it to be like a photo album or something like that. Avoiding perfect alignment.

As always, thank you for your time!
Title: Re: Tilted save/load screenshots
Post by: Snarky on Tue 20/05/2025 20:43:08
Actual image link: (https://i.imgur.com/mTc9pwr.jpeg)
Title: Re: Tilted save/load screenshots
Post by: DiegoHolt on Tue 20/05/2025 20:44:42
Sorry, I don't know what went wrong...
Title: Re: Tilted save/load screenshots
Post by: Khris on Tue 20/05/2025 20:47:29
It's fine, however you can insert the image directly into the post. Right-click the image after uploading it, then click on "Copy Image Link".

Now paste that link in between img tags:
Code (bb) Select
[img]https://i.imgur.com/mTc9pwr.jpeg[/img]
Anyway, are you using a module or template that already does display screenshots of your savegames? Are the screenshots GUI buttons? Or hotspots?
Title: Re: Tilted save/load screenshots
Post by: DiegoHolt on Tue 20/05/2025 20:54:27
Thank you, now I see the fail with the image posting...

As for the save/load I'm using the Tumbleweed template.
Title: Re: Tilted save/load screenshots
Post by: Snarky on Wed 21/05/2025 05:53:16
Quote from: DiegoHolt on Tue 20/05/2025 20:41:37Hi! :-D  Is there a way of making the images of the load/save screen tilted?

So, the answer is yeah, with some caveats.

To load the screenshots in the first place, you would use DynamicSprite.CreateFromSaveGame() (https://adventuregamestudio.github.io/ags-manual/DynamicSprite.html#dynamicspritecreatefromsavegame), creating one DynamicSprite for each slot.

If you're using AGS 3.x, you would then use DynamicSprite.Rotate() (https://adventuregamestudio.github.io/ags-manual/DynamicSprite.html#dynamicspriterotate). However, you can only rotate by an integer number of degrees, so if you have a particular template they need to fit (like your sample image), that may not work precisely. The positioning may be a bit fiddly, and if you need click detection to follow the outline of the images, that's also something you'll need to do manually.

In AGS 4.0, most graphical elements (Edit: but apparently not GUI Controls) have a .Rotation property, so you would (Edit: not) be able to put the DynamicSprites on Buttons (for example) and rotate those directly. The property is in floats so you can set it precisely, and the click detection will work correctly.
Title: Re: Tilted save/load screenshots
Post by: Khris on Wed 21/05/2025 08:29:26
The Tumbleweed template puts the screenshots on the buttons in OptionGui.asc / CustomSave::ShowLoadDialog.
Editing that to achieve the desired look is pretty involved, so since AGS 4 supports rotated buttons, you might want to consider doing that instead.
Title: Re: Tilted save/load screenshots
Post by: Crimson Wizard on Wed 21/05/2025 13:06:12
AGS 4.0 does not support rotating gui controls yet, because there were some complications with them when I first added object rotation, and later I forgot to address this problem again.

This may be worked around by placing screenshots on multiple GUIs or Overlays, and rotating them instead.
Title: Re: Tilted save/load screenshots
Post by: DiegoHolt on Wed 21/05/2025 17:07:47
I'm using version 3.6, and I have downloaded 4 but still haven't tried it out. Can I just open my 3.6 project in the new version and work there without any problem? What do you all recommend? Do I keep working on the old one or should I change? My game is about half way progress.

Quote from: Crimson Wizard on Yesterday at 13:06:12AGS 4.0 does not support rotating gui controls yet, because there were some complications with them when I first added object rotation, and later I forgot to address this problem again.

This may be worked around by placing screenshots on multiple GUIs or Overlays, and rotating them instead.

So, in your last sentence are you talking about 3.x or 4?
Title: Re: Tilted save/load screenshots
Post by: Crimson Wizard on Wed 21/05/2025 18:08:28
Quote from: DiegoHolt on Yesterday at 17:07:47I'm using version 3.6, and I have downloaded 4 but still haven't tried it out. Can I just open my 3.6 project in the new version and work there without any problem? What do you all recommend? Do I keep working on the old one or should I change? My game is about half way progress.

I recommend trying DynamicSprite.Rotate first in 3.6, as it may give an acceptable result with the certain effort.
AGS 4.0 is not nearly as stable and consistent as 3.6 now.

Quote from: DiegoHolt on Yesterday at 17:07:47
Quote from: Crimson Wizard on Yesterday at 13:06:12AGS 4.0 does not support rotating gui controls yet, because there were some complications with them when I first added object rotation, and later I forgot to address this problem again.

This may be worked around by placing screenshots on multiple GUIs or Overlays, and rotating them instead.

So, in your last sentence are you talking about 3.x or 4?

I was talking about AGS 4.0.