Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Folding/collapsing output?
Folding/collapsing output?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| George
(9 posts) Bio
|
Date
| Wed 25 May 2016 12:09 AM (UTC) Amended on Wed 25 May 2016 12:10 AM (UTC) by George
|
Message
| I'm wondering if anyone has tips on how I could go about folding/collapsing text in the output window. In other words something that normally would display like this:
Quote:
This is a long paragraph of text from a mud that describes many different things like the color of the sky and the wind and the sunlight and some animals running around and some people riding horses with strange hats on their heads
Would instead display in summary like:
Quote:
+ This is a long paragraph of text from a mud ....
What I was thinking is that I would match the text as necessary, strip it, and then replace it with the summary line. When the player clicks on the '+' symbol I would replace the summary line with the full text.
What I'm unsure about is the second part. What's a good way to make space for the expanded text? Likewise I'll have to collapse space when the player clicks the + symbol again to fold the text back. Hope that makes sense. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 25 May 2016 03:13 AM (UTC) |
Message
| The design doesn't really allow for collapsing lines like in a text editor. However you could use a trigger to replace the desired text with your example of a shorter version and make the "+" with the Hyperlink function.
If you click on the hyperlink you could display a dialog box which has the expanded text in it (or just append it to the output window with a Note function).
See: http://www.gammon.com.au/scripts/doc.php?lua=utils.msgbox |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
9,669 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top