Can this be done/displayed like this?

Post Reply
Alaran
Posts: 27
Joined: Sat Dec 19, 2009 2:51 pm

Can this be done/displayed like this?

Post by Alaran »

Hi,

A while ago I had this glorious idea of displaying stuff in a very certain way. Unfortunately I cannot get it to work quite as I'd want it to.. so I was wondering if anyone here has an idea (or can tell me how stupid this is and that it'll never work :P ). :mrgreen:

So here's what I want to do:

When text rolls in from the mud it looks like this (for example):
Code: [show] | [select all] lua
some paragraph wrapped by mudlet at 100 characters:
blah blah blah blah blah blah blah blah blah blah blah blah
<PROMPT>
Single Line goes here
<PROMPT>
What I want it to look like is this:
Code: [show] | [select all] lua
some paragraph wrapped by mudlet at 100 characters:
blah blah blah blah blah blah blah blah blah blah blah blah
<PROMPT>
<PROMPT>                                                            Single Line goes here

My problem is the wordwrap. The mud is set to not wrap. Mudlet wraps at 100 and I want it to wrap at 100. Except in those special cases where I want to push a line to the totally empty real estate I have on the right side (notably it is way above 100 characters to get there). I can't though because every echo I do would be wrapped by Mudlet at 100 again.

My solution, currently, is to have a second window and echo my lines there. Then I have a function that 'syncs' the display of the lines in my second window with my main window so that the echoed line always stays horizontally on the right side of the correct prompt line.

That sort of works. But it (obviously) doesn't stay synced if I scroll up, and I can't copy/pasta that entire text either (two windows, duh).

Other solutions I thought of that I don't quite like:

1) Setting the mud to wrap and mudlet not to wrap: That would solve it (I think?, haven't actually tried), BUT parsing and triggering things like the room desc or attack lines would also become more difficult (vastly varying in length) etc. I'm not a fan of having a ton of multi-line triggers. :/ I'm also unsure how well mudlet handles a ton of multi-line triggers (especially when compared to a longer single line).

2) Using the wrap() function to manually wrap. Um.. I didn't think beyond "this might be a performance nightmare" here to be honest...


So my question is.. is there any way to do this in one window? To sort of tell mudlet not to wrap some lines, or have an echo that circumvents mudlet wrap? Or is there a way to scroll simultaneously in two windows? (And log it? >_<)

Any ideas are welcome..

PS: For anyone wondering what the heck I am trying to do: I basically want to save some vertical spam-scroll space whenever things get fast. I don't want to gag the prompt at all. However, seeing a prompt and no lines before confuses me.. so I thought about pushing those lines further to the right (I have plenty of unused space there anyhow). If I want to see them, I can, if not I can focus on the important stuff on the left. And I still have those lines if I want to go through the log later (or that was the idea. The current two-window solution doesn't work so well for logging).

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Can this be done/displayed like this?

Post by Vadi »

Have a post-display trigger that copies the line, deletes it, moves the cursor down to the prompt, inserts some spaces and then pastes the line back perhaps?

Alaran
Posts: 27
Joined: Sat Dec 19, 2009 2:51 pm

Re: Can this be done/displayed like this?

Post by Alaran »

Um... what is a "post-display" trigger and especially how do I create one? I was under the impression that all triggers are run either run off the line from the mud directly or input (alias).

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Can this be done/displayed like this?

Post by Vadi »

It's not a special type, I just meant one that runs on the prompt.

Post Reply