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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Sat Nov 01, 2003 1:22 am   

Suggestion: color picker
 
Hopefully this suggestion will be a little more useful than my last :D

I think it would be really useful for zMUD to have a color picker. Since you're using Delphi, it would be dirt simple. Just whip up a TColorDialog and have it spit back out the hex value of picked color.

I could write my own as a plugin and probably will if one doesn't come around soon. But it just seems like this would be a good thing to include, much like using the included Editor rather than having to do things in wordpad.
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Sat Nov 01, 2003 8:06 pm   
 
I'm not sure what a color picker is.

VIEW->PREFERENCES->COLORS...->(expand list)->FOREGROUND/BACKGROUND

When clicking on a color box, I can pick any color I like. If this is not a color picker and you want to enlighten me, feel free.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Nov 02, 2003 1:33 am   
 
That's the dialog box he's talking about, he's just wanting to use it for a different purpose.

He's just looking for an RGB/colorword/colorvalue wheel so he doesn't have to go to some website or search around in the helpfile too much just to look up a color value to use in the zscript code.

I'd say whip up that plugin, round it out a bit and make doubly sure to cross all your T's and dot all your I's, and ask Zugg to host it on the website where everyone is bound to see it eventually.
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Sun Nov 02, 2003 3:17 am   
 
Actually, I was talking about using the standard windows color dialog. You can see an example of it when you go to the Display control panel, choose Appearance and click on the color under Color and click Other. That one.

I whipped up a Delphi app in about 5 minutes last night for my own use. It's dirt simple and just lets you pick a color and it copies the RGB values to the clipboard.

Using this for a while brought up another question - what colors does zMUD support? It's more than just the ANSI colors, but it's less than the full 24bit color range. Some colors come up as a completely different color. Zugg, want to comment here? I see you're using a TTerm component for the terminal window, but I'm not familiar with it.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Nov 02, 2003 4:05 am   
 
Supported colors should be the full 24bit range. All the color commands handle working with RGB hex values. If you use a small integer then they interpret the way described in %color, larger integer values are interpretted as a BGR windows color value. See the help for #PCOL, #CW, #COLOR, and maybe #MXP.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Nov 02, 2003 4:20 am   
 
I can't see any difference between that Windows color dialog and the one obtained by using Prefs|Colors|Foreground Mapping and clicking on a color and the Define Custom Colors button. I've just finished looking at them side-by-side and they appear identical to me. Is this another case of zMUD already having something you wanted?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Nov 02, 2003 8:40 am   
 
Yep, definitely. It's kind of hard to do what he wants in zscript, though, because ZMud doesn't reveal RGB values in the color dialog/preferences screens and it doesn't display color images/text when retrieving those values via %color() or %colorname(). What Cuttlefish suggests is exactly like most color dialog examples seen in programming textbooks.

And, cuttlefish, I suppose I can see why you'd copy to the clipboard, but why bother when you can show it on the plugin window itself? It's not like it'd take up much room.
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Sun Nov 02, 2003 5:08 pm   
 
LightBulb: Sorry, I thought mr kent meant the dialog before you click on the color to get the windows dialog. But yeah, that's the one, standard windows color dialog (TColorDialog in Delphi). And nah, zMUD doesn't already have the feature because, as ML says, that dialog is limited to that one screen. You can't bring up this dialog while you're editing a script in order to insert some random color value in your script.

ML: The reason I copied it to the clipboard is so I could paste it into my script. I'm just needing it as a tool while I'm editing. What would be ideal is to be able to be editing a script and be able to hit some keystroke and it pops up the color dialog, lets you choose a color and hit OK, then it automatically pastes it into the script at your insertion point. I don't think you can do that with a plugin but I'll keep reading.

V: Sorry, my mistake. I forgot that Delphi represents colors as GBR in it's TColor type, which is what the TColorDialog returns. If I had pasted it in as integer instead of hex, zMUD would have probably gotten it right anyway. However, hex is much more readable. I fixed my code and it works wonderfully, though it would be nicer to have it integrated. It's actually very simple, only 8 lines of code.
Reply with quote
hatespyware
Apprentice


Joined: 16 Dec 2002
Posts: 103

PostPosted: Sun Nov 02, 2003 6:38 pm   
 
quote:
Originally posted by MattLofton
I'd say whip up that plugin, round it out a bit and make doubly sure to cross all your T's and dot all your I's, and ask Zugg to host it on the website where everyone is bound to see it eventually.


Having to pay $40 for the "privilege" of writing a plugin is completely unreasonable in my opinion. I remember being told that one may write plugins without registering the SDK, but may not legally distribute them - unacceptable. If the reason for the SDK cost is simply to prevent 3rd party revenue generation, then there should be a GPL style license available, too.

That being said, making your 7-line color-wheel into a COM component and then using zMud's COM facilities to access it makes a lot more sense.
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Mon Nov 03, 2003 12:10 am   
 
Go away.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 03, 2003 6:03 am   
 
zMUD has only recently supported 24bit color. So No, I haven't had a chance to add any sort of color selection dialog.

TTerm is the custom component that I wrote for handling the scrolling text window, so you aren't going to find it documented or available anywhere.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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