The scroll bar of userdata description

Q&A about the latest versions
Post Reply
ejivusko
Posts: 3
Joined: Tue Aug 16, 2022 6:51 pm

Hello everyone,
I have several nodes in my tour. Each has quite a long user data description, so it has a scroll bar. The issue is when I scroll it to the bottom on one node and then click to the next one, it loads in the same view, scrolled to the bottom. Can it be set to always open at the top of the description? I'll be very grateful for any advice or solution.

Attached is a video record of this issue.
https://youtube.com/shorts/HUJLsxC5Ba0?feature=share
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
The way to do this is to put your text box inside a scroll area.
You can use before node change to "remove" the text box then on node changed, "add" the text box back.
This will then reset the start position of the scroll area.
Please see the attached project.
Regards,
Attachments
project.zip
(26.02 KiB) Downloaded 67 times
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/
ejivusko
Posts: 3
Joined: Tue Aug 16, 2022 6:51 pm

Hopki,
Thank you very much for the support. It works!

But I have another issue now and would be very grateful if you help me with the possible right direction.

The client doesn't like scrolling in a narrow window. (it's suitable for mobile view, but he doesn't like how it appears on desktop view).

At first, I tried to set the size of this user data block with percent units, but something went wrong:

Then I tried using the Logic block:
If "Player width >1900" - the width and height of the text block and scroller area would increase. I was going to set several rules depending on the popular widths of screens.

But then I discovered that user data is made from rectangles which cannot be auto-scaled with the text box. So I had issues with different lengths of node descriptions.

So then tried to use Node ID to set a specific text height for each node.
The idea was to set a certain height for a certain text length for each of the five nodes. But unfortunately, somewhy it hasn't worked:

I hope you can help me with any of these attempts to get the desired result.

Thanks!
Last edited by ejivusko on Sat Aug 20, 2022 12:29 pm, edited 1 time in total.
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
In this case where a text box has very little file size, just use two text boxes, one optimised for a narrow display and one for wider.
Then use the visible logic block to show and hide then.

For example,
vis_popup = true AND
player >= 1200
Visible true for the one for the computer.

Then
vis_popup = true AND
player < 1200
Visible true for the one for the smaller screen.

As the info button toggles the vis_popup variable, only one will show depending on player width.
Simple :D
Regards,
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/
ejivusko
Posts: 3
Joined: Tue Aug 16, 2022 6:51 pm

Hi Hopki,

Thank you very much. It works.
I created many boxes for the popular widths of the screens! ;)
Post Reply