Mudlet doesnt clear screen

Hesk
Posts: 18
Joined: Wed Dec 26, 2018 10:10 pm

Re: Mudlet doesnt clear screen

Post by Hesk » Sat Dec 29, 2018 12:10 pm

Nothing of those gives me the lines of the current screen. Just of the whole buffer.
I need a function which gives me the line-count which are currently displayed.
For example at my screen there are 82 lines displayed.

Is there anything like that?

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

Re: Mudlet doesnt clear screen

Post by Vadi » Sat Dec 29, 2018 1:21 pm

Yes, get the dimensions of th screen and then divide by the height of a character

Hesk
Posts: 18
Joined: Wed Dec 26, 2018 10:10 pm

Re: Mudlet doesnt clear screen

Post by Hesk » Sat Dec 29, 2018 11:48 pm

Well..actually what i was searching for was : getRowCount()

But it doesnt work.

moveCursor doesnt work either. I move the cursor to line-number - 10 .. but the next content comming from the mud is still appended to the end, not to the cursor position.

Really sad mudlet doesnt seem to be able to handle this.
I just want those 10-15 lines to be shown on the exact position in the main-window, overriding itself

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

Re: Mudlet doesnt clear screen

Post by Vadi » Sun Dec 30, 2018 8:00 am

Uh yes, content is always appended to the bottom, not where the cursor is. Otherwise, any script could move the cursor and leave it there and mess up the players display. You can see how we're saving people a ton of headaches by doing it the way we do right now.

User avatar
SlySven
Posts: 903
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mudlet doesnt clear screen

Post by SlySven » Tue Jan 22, 2019 3:41 am

That CSR sequence, like other things like cursor movement are VT100 commands that Mudlet cannot easily handle - they are more suited to a CLI type interface rather than our GUI one because we take the output from the MUD Server line-by-line and pass those lines through our trigger engine system. Cursor movement and screen clearing functionality break such things because it means that the Server is trying to change things that it has already sent to us and we have already processed. As Vadim is proposing, you might be able to detect that CLear Screen command and use it to delete a quantity of existing lines from the displayed text corresponding to the number of rows of text in the current main screen size - though you could also be losing wanted text as well as stuff you want cleared...

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests