Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [AGK] How to create a scroll-able text with images ?

Author
Message
Alex Goaga
9
Years of Service
User Offline
Joined: 6th Nov 2015
Location:
Posted: 31st Oct 2016 13:54
Hey guys, I have a question regarding the possibility of creating a scroll-able text in AGK.

Can someone provide an idea in order to create this idea?

I have an idea to create this feature like this : -> create text , tap somewhere , then the text will move gradually outside off the screen. But i don't know how to create the scroll-able bar near it, and I fear that this idea might create issues.

Any ideas or code examples ?

Thank you,
Alex
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 31st Oct 2016 13:55
Just change the x position of the text every cycle.

SetTextPosition etc.
Alex Goaga
9
Years of Service
User Offline
Joined: 6th Nov 2015
Location:
Posted: 31st Oct 2016 13:58
Yes, but how about the scroll-able bar with the maximum and minim weight ?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 31st Oct 2016 14:10
the scroll range is the text height - virtual screen height.
maybe this GetTextTotalHeight and GetVirtualHeight ()
i would convert the vertical input at screen into -1 and 1 so you can use any other input device.
AGK (Steam) V2.0.21 : Windows 10 Pro 64 Bit : AMD (16.6) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Oct 2016 14:19
This is the code you are looking for.

I used it in a project, it works really well.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Alex Goaga
9
Years of Service
User Offline
Joined: 6th Nov 2015
Location:
Posted: 31st Oct 2016 14:23
it's perfect , i will test it today ! Thank you !

Login to post a reply

Server time is: 2024-11-25 01:46:34
Your offset time is: 2024-11-25 01:46:34