Mudlet features and API requests

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Mudlet API requests

Post by kevutian »

For 2.1, please, please, please can we improve the screenreader capabilities?

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

Re: Mudlet API requests

Post by Vadi »

We'd certainly like to, but given absolutely zero feedback from people who use them, it's proven impossible to - so work on that stalled. It can't progress unless people actually interested in using the screenreader edition will be interested in making it happen.

Barnabus
Posts: 12
Joined: Tue Dec 11, 2012 12:03 am

Re: Mudlet features and API requests

Post by Barnabus »

A function to convert ANSI sequences to cecho-friendly codes, and/or support for echoing ANSI to a miniconsole.

I'm implementing GMCP and would like to have ANSI codes in some fields (equipment/inventory related, so the main code supplies pre-formatted data).

I know this could be done in Lua, but a C function seems better - and presumably 99% of the code already exists to support colour.

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

Re: Mudlet features and API requests

Post by Vadi »

For the main display, you can work out what is the rgb color of text with http://wiki.mudlet.org/w/Manual:UI_Functions#getFgColor. Otherwise, with GMCP being an out of band data protocol, I don't think ANSI should be mixed in, sorry.

Barnabus
Posts: 12
Joined: Tue Dec 11, 2012 12:03 am

Re: Mudlet features and API requests

Post by Barnabus »

The use case isn't hugely relevant to the function request; a routine to translate ANSI sequences is generic.

In general, I'd agree that mixing ANSI into GMCP could be bad, however I'm retrofitting an existing codebase, rather than starting from scratch, so some design compromises need to be made.

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

Re: Mudlet features and API requests

Post by Vadi »

The use case I think is, since otherwise there's no point in adding what then becomes unused clutter. Mudlet also handles the ANSI sequences coming in from the MUD where they matter adequately, both retrieving and settings colors is also adequately handled.

Though to be fair, all this would involve is a table lookup in Lua, so it will not be that slow - if it even will be slower. Talking at minute frequencies, switching to the C context in Lua isn't fast either, so a C function that does minute work won't get you the advantage you think and might even be slower than a pure Lua function.

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: Mudlet features and API requests

Post by Iocun »

I'd love if the onDisconnectionEvent was raised when it's the mud that closes the connection too (as a result of quitting or timing out), rather than only when you disconnect manually. If that's undesirable for some reason, another event that is raised then.

Another thing that would be great to have is a function that returns your current mouse cursor coordinates. The MousePress and MouseRelease events already give you that info when you click, but for some things (e.g. drag-and-drop of GUI elements) it would be useful to read the current mouse position at times where you aren't clicking too.

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

Re: Mudlet features and API requests

Post by Vadi »

Thanks, onDisconnectionEvent will be fixed for 2.1.

Current mouse coordinates - fair enough. I guess you could track it on a timer.

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Mudlet features and API requests

Post by kevutian »

Joining the support with the group requesting some semblance of hover method for labels.

setLabelHoverText(window, text) perhaps?

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Mudlet features and API requests

Post by kevutian »

Oh, libgit2 for Mudlet! *dreams*

Post Reply