Some MUDs support both blink and italic. And since blink is shown as italics, I can't tell the difference, for example, if someone has blinking then italic title. What can I change so I can tell a difference between them?
Blinking/italic
Posted by Zeno on Sun 05 Sep 2004 05:19 AM — 10 posts, 35,068 views.
It won't be easy, but using GetStyleInfo you can detect the presence of blink in a style run.
Or to translate Nick's response: Not at present, since the code to make something actually blink isn't exactly part of the standard text output system. And despite being a 'custom' window, Nick uses fairly standard text drawing features. There isn't a whole lot you could do to make it work, unless maybe you just forced a redraw of the entire window every so many milliseconds (half second maybe?) and had the blinking part redraw with the background color every other forced redraw. Hmm. How hard would that be and how much would it slow things down Nick? The key would be to make sure it only switches color 'when' the forced redraw happens, not every time it scrolls or redraws.
I would prefer to think of this problem as one more reason why we should be able to edit text with callbacks before it gets evaluated. (that MXP color changing thing was another)
Of course I understand the problems with that (Ansi colors, and plenty of other things). Although if someone was going to tweak things on such a low level, you'd think theyd be able to cope pretty well. Normal users arent really going to travel into this realm unless they know what theyre doing.
Of course I understand the problems with that (Ansi colors, and plenty of other things). Although if someone was going to tweak things on such a low level, you'd think theyd be able to cope pretty well. Normal users arent really going to travel into this realm unless they know what theyre doing.
Yeah, I figured it wouldn't be easy, if at all possible. The reason why I sort of need this, is because I do not allow blinking in players titles, but italics is fine. Its just I can't tell the difference.
Then why do you ban people from using it? :P It's like IRC where people kick you out if you use color. If you don't like color, disable it in your IRC client. I hate that.
That really isn't the whole point though, heh. I'd like to see what text is italic or blinking.
I suppose I should remove the blink tags from mortals helpfiles though.
I suppose I should remove the blink tags from mortals helpfiles though.
If you just want to detect that someone is using blinking, and you don't allow it, then a "catch-all" trigger could catch every line (or for speed, the types of lines you expect), then quickly run it through a loop that uses GetStyleInfo. If the style run type is blinking, then you could do a world.note (eg. -- WARNING, the word "blah" is in blinking style).
Yeah, might as well just hide the color tags from mortals though. I don't have time to deal with enforcement, I'm pretty much always coding.
Hiding the tags won't stop those that already know about them (or experiment to find them) from making use of them. Simple solution is add a lvl check for immortal to the blink tag in the code or just comment the blink functionality.