anchor close button to image

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
Niki
Posts: 10
Joined: Thu Jun 15, 2017 3:39 pm

Hi, i am just starting to learn skins and i have a really basic question: I loaded the "Image PupUp Simplex" Component into the default simplex skin. By default, the encircled X to close the image always stays at the top right of the screen. But i want it to always stay at the top right of the Image.

I tried nesting "image_popup_close" into the "image_popup" folder and even into the "popup_image". does not work...

what do i have to do? Thanks!
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Niki,
The external loader is set to open the image to show it at its original size or scaled to fit the external loader keeping its aspect ratio.
This is why the close button is anchored top right of the skin canvas as depending on the width of the image the close button can shif position as it stays top right of the external loader.
Examples:

landscape.png
landscape.png (111.88 KiB) Viewed 2633 times
portrate.png
portrate.png (75.87 KiB) Viewed 2633 times

In the above the external loaders background is enabled so you can see it, but just think what it would look like if it was not. The close button would appear to be jumping around.

You can set the external loader not to scale automaticity and keep the image in the external loader.
Then you can move the close button to the top right of the external loader.
Of course this means the image will no longer scale automatically.
But you can set up a scaling logic block to do this with screen width.

Change the external loaders position and size to pixels.
As an example anchor the external loader centre of the skin editor and make its size 460 x 310px then using the Edit menu centre the loader in the skin canvas.
Set the external loader like so:

externalsettings.png
externalsettings.png (63.45 KiB) Viewed 2633 times

This will show all your images in the 460 x 310px loader window keeping the aspect ratio of the image.
Under the external loaders scaling logic block set up so player width <= 320, scale to 0.8/0.8.
You can add different settings or if you start with the external loader larger add more so it stays in the screen width for say tablet and phone.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Niki
Posts: 10
Joined: Thu Jun 15, 2017 3:39 pm

Hey Hopki, thanks a lot for your very detailed answer, i am new to the forums and somehow i was not notified by email when you answered, so i just saw it now. Otherwise i would have thanked you earlier...

I will try your approach asap, i may be coming back to you then, but i think i won't have to because your explanation is so detailed :)

In the meantime, would you be so kind and have a look at my new topic?: viewtopic.php?f=13&t=12218

Thanks!
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Niki,
It has already been answered by Jare.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Post Reply