I _love_ the MUSHclient colour picker. It's awesome.
And yet I'm sad I can't really do much with it from a script. Sure, I can do this:
world.DoCommand("ColourPicker")
but I'd love to do so much more with it, as that doesn't help me much. Let me explain.
Basically, I want to use it to configure colours for one of my plugins. I've got a listing with settings, and for the colour settings I show the colour in its hex notation. Now I want to add a 'modify' link, have the picker pop up, let the use select a color and hit OK.. and then have my script update its setting in response.
There's several ways this could be implemented, but if it is easiest for you, something like utils.inputbox would be fine despite the lack of support for other scripting engines. And rather than copying the contents, all 'OK'-like exits from the dialog should not copy to the clipboard, but simply return the value.
Parameters like initial_color, title and sort direction (including 'whatever it was last time') are a must. Maybe a flag that lets the function return the value closest to the kind the user clicked on (e.g. MXP, MUSHclient colour name, Lua, etc.) would be nice as well, but a simple int color return value is just fine by me.
The exact details I'd leave to you. Personally, I feel that if I can select a colour and use it the dialog in my script without confusing my users, I'll be more than happy enough! :) |