[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Colour Picker

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Colour Picker

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Beale   (35 posts)  [Biography] bio
Date Wed 10 Aug 2005 07:20 PM (UTC)  quote  ]
Message
Would it be at all possible, strictly from a code standpoint, to have a world.ColourPick function that brought up the colour picker and returned the RGB number that the user chose? This'd be quite handy.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 17 Aug 2005 07:28 AM (UTC)  quote  ]
Message
Sounds good, but the problem is the script would pause the client indefinitely while you choose a colour.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Beale   (35 posts)  [Biography] bio
Date Reply #2 on Wed 17 Aug 2005 11:33 AM (UTC)  quote  ]

Amended on Wed 17 Aug 2005 11:37 AM (UTC) by Beale

Message
Hmmm. But would this actually be a problem?
I mean, VBScript already does this for things like InputBox and MsgBox, but I guess it can do that because it's an external component, and the functionality is built in. It might be more of a problem for, say, Lua.
Would the main program thread keep running while the script paused?

And I guess the other issue is working out what kind of value to return...
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 19 Aug 2005 11:55 PM (UTC)  quote  ]
Message
It probably can be done easily enough, if you are prepared to accept the pause. If the script pauses then basically the client pauses, which isn't a great thing if you have multiple worlds.

As for returning the value, a single number would do it, that is how RGB values are stored internally anyway (one byte each for red, green and blue).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sat 15 Oct 2005 01:57 AM (UTC)  quote  ]
Message
Added PickColour script function to version 3.67.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,200 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]