Scrollable Textbox

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Unrealomega
Prole
Posts: 2
Joined: Sat Apr 04, 2009 10:06 am

Scrollable Textbox

Post by Unrealomega »

I've been wondering if this exists already or if it's possible to implement a scrollable textbox. I've done some searches on the forum, but couldn't find an answer.

Basically, what I'm looking for is a textbox that can be scrolled, hold either an infinite or limited amount of lines.

Is this possible?

EDIT: After testing some ideas out, I think I've figured out a possible solution: Use Scissor to remove the excess text.
Now, the only issue would be when scissor is used, as it should be used BEFORE everything else(That isn't apart of that single textbox) is draw. I may work to build a simple example when I have time.

EDIT1: Another method I was pondering was place all the text into it's a table. And text is added, the window will remove a line from the top of the current visible list. The table would continue to retain all the information, so that as the user scrolls up, it will "scoot up" the list.
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Scrollable Textbox

Post by osgeld »

the second option sounds easier (to me)
Unrealomega
Prole
Posts: 2
Joined: Sat Apr 04, 2009 10:06 am

Re: Scrollable Textbox

Post by Unrealomega »

osgeld wrote:the second option sounds easier (to me)
It would be a great option when it comes to designing a static size text box. If you wanted to create a simple GUI library that would allow the user to input a size for the textbox, the Scissor option would work best.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: Scrollable Textbox

Post by appleide »

IIRC Borsty used some kind of table to hold the real text data and to hold viewable text data in his editable text-box but he never released it. I remember he said scissor boxes might be too slow.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 53 guests