Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
MCrews17
Beginner


Joined: 16 Oct 2011
Posts: 13

PostPosted: Mon Nov 25, 2013 9:48 pm   

Does anybody know any tricks for the #WINDOW command?
 
There seem to be a lot of hidden codes for the #WINDOW command

I found a really cool one that allows you to create 'click window'

//Here's my snippet:
//-------------------
#CLR Quick-Menu
#WIN Quick-Menu { }
#WIN Quick-Menu {
%char(9)<send '#SEND cast heal;drink potion'>O</send>%char(32)%char(32)<send '#SEND cast heal'>heal</send>%char(32)%char(32)%char(32)<send '#SEND drink potion'>potion</send>
}
#WIN Quick-Menu {
%char(9)<send '#SEND cast spell;drink elixir'>O</send> <send '#SEND cast spell'>spell</send>%char(32)%char(32)<send '#SEND drink elixir'>elixir</send>
}



Anybody know how to spice it up with images and horizontal lines?
Reply with quote
MCrews17
Beginner


Joined: 16 Oct 2011
Posts: 13

PostPosted: Mon Nov 25, 2013 10:06 pm   Special Characters using %char()
 
If your wondering where to get the special %char() codes I reference a DOS Ascii chart and it seems to work fine.
[url]http://www.asciitable.com/[/url]

The first 32 codes have special values, anything after that uses characters.

%char(9) = tab
%char(13)=enter
%char(32)=space

%char(123)= { open bracket
%char(125)= } close bracket
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Nov 26, 2013 4:59 am   
 
Quote:

Anybody know how to spice it up with images and horizontal lines?


If you mean how can you draw a line from point A to point B, you're out of luck. CMud doesn't do drawn shapes like you'd see in a package such as CorelDraw, so any image functionality you'd be able to jimmy into a window would take up the same position as a textual character does. This is called inline imaging, and if the image is larger than the font height it will make the line it appears on grow to accomodate the image height.

Code:

this is a line of plain text that appears above the image
                                  +-----+
                                  |     |
this is a line of plain text that +-----+ contains the image
this is a line of plain text that appears below the image


That said, this doesn't mean you can't use images. You can use images to provide separate backgrounds to your individual windows, complete with clickable hotspots and "holes" for floating button placement (the buttons would be far more convenient should you want the window to display changeable data).

If you want something more along the lines of Ascii Art, some fonts have line-border characters available as part of their extended ascii ranges (anything beyond character 125 or so). These ascii values (the numbers used in the %char() function) are font dependant, so if you change fonts the printed character will be different. Medievia has a couple of fonts specifically used for their games that include such characters, though I don't know of any fonts beyond that that do.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net