Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 07-22-2020, 07:32 PM   #1
SlySven
New Member
 
SlySven's Avatar
 
Join Date: Nov 2014
Location: Deepest Wiltshire, UK
Home MUD: WoTMUD
Posts: 13
SlySven is on a distinguished road
Lightbulb Concealed text - when / how to know - to show it?

Looking through the client I code for issues list - I found someone wanting to display text that the MUD Game server has intentionally (but not irreversibly) hidden from the player by setting the foreground colour to be the same as the background one https://github.com/Mudlet/Mudlet/issues/3961 . I am also aware of the SGR codes 8 / 28 to conceal/reveal text.

This got me thinking back to the days of teletext on analogue television in the UK (I used to design the hardware for them and have messed around with a teletext generator which was loaded with pages via a serial communications port!) That had a similar feature that was used for quizzes / jokes and the like where the answer or punchline was conceal (foreground colour artificially rendered in the background colour) until a specific (dedicated to that function) button was pressed on the remote control that would cancel the concealment and show the previously hidden text.

Does anyone have any thoughts about how this could be replicated in the client in a non-client specific manner. Some other clients reveal the text when it is selected - for Mudlet the end-user has to, currently, copy the text to, say, a GUI text editor. I am considering at present:
  • adding a scriptable (Lua) API function to toggle (or perhaps reveal for a fixed time) all the text hidden in this manner
  • adding a context (right click) menu option to reveal such text
However both of these options would be specific to this client. I was wondering whether any other client's coders wish to propose, say, a currently spare ESC SGR code or an out-of-band protocol that MUD servers could utilise to change/toggle the showing or hiding of concealed text. Importantly for the Mudlet client case it does not allow the Server to change text data that has already been received by it - so what is wanted is something that would say "go and show" or "go and hide" the text that has previously been marked to be concealed (either by the SGR 8 m code or by being painted in the same fire and background colour).

I suppose one option would be to use an OSC (operating system command) type code - perhaps something along the lines of
Code:
<ESC>]C1<ST>
to conceal the text and
Code:
<ESC>]C0<ST>
where <ST> is the normal "String Terminator" {i.e. <ESC> followed by \ (backslash) which is the proper characters (bytes) to end an <OSC> command}...
SlySven is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 07:35 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014