| From: | |
| Date: | 02 Feb 2001 at 04:36:52 |
| Subject: | Re: Can someone look at this code? |
On 02-Feb-01, Jack York wrote:
-snip-
>>ObtainbestPen();
> Then I don't understand how the function works. I thought it
> just returned a value of one pen that approximates what you
> asked for? It doesn't set the value into, say, the screens
> colormap AFAIK. So how/when does it change the screens
> colors?
It doesn't, it just picks a colour register that is already set,
to the closest requirements you ask for..
> I have a config option in the program in which the user can set the
> colors of things like text in a listbrowser and front/background pens
> of the gadgets. If the user runs the program and saves these
> colors, they should be set before a window is opened the next time
> the program is run. Otherwise the window may open with one set
> of colors and then change shortly after to the users. Obviously not
> the way to go.
I believe the colour register for a new screen are set to a default
value upon opening, or the same as a cloned screen, if you did that.
If you want a custom screen that you can define all the registers in,
that's fine, but you should never change the colour register values
of someone elses screen, say for instance, Workbench...
If you use your own screen, then you are free to set them to anything
you like, obviously, you would save the register values in your
config file or where ever & do a LoadRGB*() function after opening
your custom screen & windows..
When you know what register number you are manually adjusting,
you don't need to call ObtainBestPen(),
because you already know what register your adjustment is in... (:>
ObtainBestPen() is for finding the colour you want, from someone
elses palette..
I really have no idea how this effects BOOPSI \ Reaction classes
as I havn't been able to fingure out (yet) where they get their pens
from or if you can actually specify a pen for a particular part of the
display. (object ?)
However, this is how i've treated normal custom screen displays
in my code before & they behave exactly as expected..
Regards
Colin Wenzel. Quensland, Australia.
EMAIL: colstv@hotkey.net.au
URL: http://www.hotkey.net.au/~colstv/
AMIGA: 4000T, 68060/50, 150Mb RAM,
OS 3.9, Spectrum Gfx Card + P96.
Need an Image Generator For CATV ??
http://connect.to/products
_________________________________________
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://click.egroups.com/1/11231/0/_/451227/_/981088744/
---------------------------------------------------------------------_->