Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Beale
(35 posts) 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. | top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) 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 | top |
|
| Posted by |
Beale
(35 posts) 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... | top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) 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 | top |
|
| Posted by |
Nick Gammon
Australia (18,770 posts) 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 | 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
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )