Hello,
i have a small mud which sends CLS (code: ESC+[2J) but mudlet doesnt clear the screen.
In other clients (for example cmud) its working.
Anyone can help?
Thanks
Mudlet doesnt clear screen
Re: Mudlet doesnt clear screen
I don't believe we implement support for that telnet command. You can send in a PR if you'd like, or workaround with some Lua code - hook into sysTelnetEvent to catch it and use clearWindow() to empty the screen.
Re: Mudlet doesnt clear screen
Can you give an example maybe?
This doesnt seem to work:
Name: telnetEventHandler
Registered Event Handlers: sysTelnetEvent
function telnetEventHandler(type, option, message)
display("Unhandled event: " .. type .. ":" .. option .. ":" .. message)
end
Thank you
This doesnt seem to work:
Name: telnetEventHandler
Registered Event Handlers: sysTelnetEvent
function telnetEventHandler(type, option, message)
display("Unhandled event: " .. type .. ":" .. option .. ":" .. message)
end
Thank you
Re: Mudlet doesnt clear screen
Hm..the script is raised when i log in to the mud:
"Unhandled event: 252:1:��"
But is not raised where that CLS is sent. Maybe it is suported but not executed?
"Unhandled event: 252:1:��"
But is not raised where that CLS is sent. Maybe it is suported but not executed?
Re: Mudlet doesnt clear screen
Not sure. Could you record a replay (casette button bottom-right of the main window) and post it?
Re: Mudlet doesnt clear screen
Here is the output from .dat:
æ L[33m[ UNDEFINED !, omountain ][0m[37m src/room/overland#485
ÿúÉHoly._ovl (ÿð[2J[H
[40m[37m[42m[33m.....[40m[37m[40m[37m
[40m[37m[42m[33m....[47m[34m:::::[40m[37m[40m[37m
[40m[37m[42m[33m.[47m[34m:::::[42m[33m.....[40m[37m[40m[37m
[40m[37m[42m[33m..[47m[34m:[42m[33m.........[44m[37m~[40m[40m[37m
[40m[37m[42m[33m..[47m[34m:[42m[33m......[44m[37m~~~~[40m[40m[37m
[40m[37m[47m[34m:::::[44m[37m~~~~~~[42m[33m...[47m[34m:[40m[37m[40m[37m
[40m[37m[44m[37m~[42m[33m.[44m[37m~[41mH[47m[33m=[44m[37m~[42m[33m..[41m[37mTTT[47m[34m::::[40m[37m[40m[37m
[40m[37m[44m[37m~~~[42m[33m.[47m[34m:::[31mX[34m:[41m[37mT[47m[34m::[42m[33m...[40m[37m[40m[37m
[40m[37m[44m[37m~[42m[33m...[47m[34m:[42m[33m..........[40m[37m[40m[37m
[40m[37m[42m[33m...[47m[34m::[42m[33m..........[40m[37m[40m[37m
[40m[37m[47m[34m:::[42m[33m..........[40m[37m[40m[37m
[40m[37m[42m[33m.............[40m[37m[40m[37m
[40m[37m[42m[33m...........[40m[37m[40m[37m
[40m[37m[42m[33m.........[40m[37m[40m[37m
[40m[37m[42m[33m.....[40m[37m[40m[37m
* Y> [0mÿï
The [2J is the CLS.
I also tried with an gmcp-flag (Holy._ovl). That is nearly working. But clearWindow() is too much because it clears everything.
In the mud you ware walking on a map...and i want that map to be on the same position on the screen and not scrolling.
So i need someting like "start at the top of the screen"
æ L[33m[ UNDEFINED !, omountain ][0m[37m src/room/overland#485
ÿúÉHoly._ovl (ÿð[2J[H
[40m[37m[42m[33m.....[40m[37m[40m[37m
[40m[37m[42m[33m....[47m[34m:::::[40m[37m[40m[37m
[40m[37m[42m[33m.[47m[34m:::::[42m[33m.....[40m[37m[40m[37m
[40m[37m[42m[33m..[47m[34m:[42m[33m.........[44m[37m~[40m[40m[37m
[40m[37m[42m[33m..[47m[34m:[42m[33m......[44m[37m~~~~[40m[40m[37m
[40m[37m[47m[34m:::::[44m[37m~~~~~~[42m[33m...[47m[34m:[40m[37m[40m[37m
[40m[37m[44m[37m~[42m[33m.[44m[37m~[41mH[47m[33m=[44m[37m~[42m[33m..[41m[37mTTT[47m[34m::::[40m[37m[40m[37m
[40m[37m[44m[37m~~~[42m[33m.[47m[34m:::[31mX[34m:[41m[37mT[47m[34m::[42m[33m...[40m[37m[40m[37m
[40m[37m[44m[37m~[42m[33m...[47m[34m:[42m[33m..........[40m[37m[40m[37m
[40m[37m[42m[33m...[47m[34m::[42m[33m..........[40m[37m[40m[37m
[40m[37m[47m[34m:::[42m[33m..........[40m[37m[40m[37m
[40m[37m[42m[33m.............[40m[37m[40m[37m
[40m[37m[42m[33m...........[40m[37m[40m[37m
[40m[37m[42m[33m.........[40m[37m[40m[37m
[40m[37m[42m[33m.....[40m[37m[40m[37m
* Y> [0mÿï
The [2J is the CLS.
I also tried with an gmcp-flag (Holy._ovl). That is nearly working. But clearWindow() is too much because it clears everything.
In the mud you ware walking on a map...and i want that map to be on the same position on the screen and not scrolling.
So i need someting like "start at the top of the screen"
Re: Mudlet doesnt clear screen
Is is possible to clear the current screen with some combination of moveCursor and deleteLine?
My thinking:
i get the gmcp-signal from the mud that the map comes. i clear the current screen and then the map is shown
Possible?
My thinking:
i get the gmcp-signal from the mud that the map comes. i clear the current screen and then the map is shown
Possible?
Re: Mudlet doesnt clear screen
Why not just create a miniconsole and show the map there?
Re: Mudlet doesnt clear screen
Would not feel right for this mud.
What i need: how many lines are on the current screen. So i can scroll them away:
function clear()
for i = 1, lines_on_screen, 1 do
echo("\n")
end
end
Is there some way to get the lines on the current screen?
It would work with clearWindow...but then everything is cleared and the user cant scroll up to look at something.
What i need: how many lines are on the current screen. So i can scroll them away:
function clear()
for i = 1, lines_on_screen, 1 do
echo("\n")
end
end
Is there some way to get the lines on the current screen?
It would work with clearWindow...but then everything is cleared and the user cant scroll up to look at something.
Re: Mudlet doesnt clear screen
Yes - see getLastLineNumber(), getLineCount(), getLineNumber()