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 / Text area with vertical scroll bar?

Author
Message
2D Analyst
AGK Developer
19
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 21st Mar 2019 04:00
I would like to make a chat room with multi message lines and vertical scroll bar so user can drag to see what messages.

I don’t believe there is a built in function for this so what would be the best or most efficient way of doing this?
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 27th Mar 2019 19:22 Edited at: 27th Mar 2019 20:09
I have played around with this a bit, I can post some code tonight when I get home from work.

What I did was have all the text added to one string, then move the y position of the string to scroll it up and down. The string is confined to limited area of the screen.

The tricky part for me is determining how big to make the scroll bar. A really long string would have a small scroll bar, and vice versa.

In the meantime, here is some code to show how to limit text to an area on the screen. Use the mouse scroll wheel to move the text up and down.

Login to post a reply

Server time is: 2024-04-20 16:18:56
Your offset time is: 2024-04-20 16:18:56