Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Miniwindows
➜ WindowRectOp
Posting of new messages is disabled at present.
Refresh page
Posted by
| Cage_fire_2000
USA (119 posts) Bio
|
Date
| Fri 17 Oct 2008 07:30 PM (UTC) |
Message
| I've been playing around with making a miniwindow library in Lua, and I was playing around with WindowRectOp for buttons and labels, and I find action 5(Draw Edge) pretty useful for buttons and such, however it's always gray, is there any way to change the color, both color arguments seem to effect how it's drawn and not what color it is. Also what is the code for the color it's filled with? So I can make the non-sunken labels match. | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #1 on Fri 17 Oct 2008 07:49 PM (UTC) Amended on Fri 17 Oct 2008 07:50 PM (UTC) by Worstje
|
Message
| Draw Edge probably uses the windows libraries. In other words, it would use two colors specified in the Display Properties > Appearance > Advanced screen. Don't ask me which two, though. | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 18 Oct 2008 03:37 AM (UTC) |
Message
| I assumed when I saw the gray boxes, when the colour wasn't specified anywhere, that it was using the Windows colour scheme (as my usual boxes were gray).
And this indeed proved to be the case, if you change the Display Properties -> Appearance -> Color Scheme to something else (eg. Maple) then the box drawn by WindowRectOp (5) takes on the new colour.
This is good if you want the buttons to agree with the user's colour scheme, not so good if you want a consistent look and feel.
if you want to make your own, with your own colours, you had better simulate the 3D look by getting a screen copy, looking at it magnified to see what they did (eg. darker lines, lighter lines), and build them up manually in your library. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Cage_fire_2000
USA (119 posts) Bio
|
Date
| Reply #3 on Sat 18 Oct 2008 04:04 AM (UTC) Amended on Sat 18 Oct 2008 04:10 AM (UTC) by Cage_fire_2000
|
Message
| Well, I was using method 2 for drawing label backgrounds without the border, but I wanted it to match, but I just discovered GetSysColor() and have hopes that it'll fix my issue, as long as they match I don't really care too much. Although it does make the backcolor attribute pretty useless if you have a border, oh well.
Edit: Yeah, GetSysColor(15) seems to do the trick I think. | 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.
13,860 views.
Posting of new messages is disabled at present.
Refresh page
top