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
➜ Lua
➜ Random Lua Questions
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
| Posted by
| Worstje
Netherlands (899 posts) Bio
|
| Date
| Reply #15 on Wed 01 Feb 2017 02:08 AM (UTC) |
| Message
| | Nah, it would make more sense to hack it into my own. I have some rather esoteric needs in this plugin or I would not have reinvented the wheel. :-/ | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #16 on Wed 01 Feb 2017 04:41 AM (UTC) |
| Message
| | I enhanced the plugin a few times. Now it can handle embedded newlines when you go to add more lines. You can also change the font interactively. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Worstje
Netherlands (899 posts) Bio
|
| Date
| Reply #17 on Wed 01 Feb 2017 06:46 AM (UTC) |
| Message
| The plugin is my old Previewer plugin which I use to simulate game commands. (Yay color codes, special syntactual identifiers or other complicated MUSH commands.)
It goes out of its way to resemble MUSHclient's own rendering as much as humanly possible. On its own that should not be too hard, but since I also combine this with applying spell-checking, red 'Word squiggles' to match misspelled words as well as the tracking of positions in the command window, the implementation tends to get rather complicated on a lot of different layers.
In theory, I ought to be able to split things like wrapping, rendering, spell-checking and other such happy stuff into perfectly individual functions... but they end up relying on each other just a bit too often in more or less subtle ways.
Besides, if I end up implementing it, I probably need to do so in a way that supports my architecture where all the visual stuff has been split off into its own module for maximum visual customizability. Which means I need to go back to figuring out how all of that worked, how it needs to change to support scrolling, and finally cry over the fact it probably wasn't worth it.
That plugin basically implements the client and server at the same time. It is an utter nightmare, yet I keep coming back to it every so often. xD | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #18 on Wed 01 Feb 2017 08:47 PM (UTC) |
| Message
| If you have a function that draws the text (with whatever level of complexity) then scrolling basically just offsets the Y starting point (ie. you start drawing above the window).
So instead of starting at Y=0, you start at Y=-400 or whatever so that you don't actually see the part you have scrolled past.
Having done that you just draw a scroll bar with a thumb in the appropriate place. |
- 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.
72,214 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top