[net.micro.amiga] menubars & colors

ir470@sdcc6.UUCP (S. Lewis) (06/16/86)

Here is a question for the menu gurus...

I am using a custom screen with 16 colors, and use the
SetMenuStrip() call to set up a menu attached to a recently
opened window (in the custom screen, of course).

The problem now...

I haven't been able to discover how to control the highlight
color which appears when proceeding to select a menu item.
Note that I am talking about the color which appears when
you move the mouse pointer over the menu name in the top
line of the screen, and NOT the color which appears when you
select a menu item in the body of the menu when you have 
the HIGHCOMP flag set.

The color which appears currently is a light green, which is
very hard on the eyes, since the foreground (?) color is
white.

Please help!!

Sean Lewis
...sdcsvax!sdcc6!ir470

jimm@amiga.UUCP (Jim Mackraz) (06/18/86)

In article <2674@sdcc6.UUCP> ir470@sdcc6.UUCP (S. Lewis) writes:
>Here is a question for the menu gurus...
>
>I am using a custom screen with 16 colors, and use the
>SetMenuStrip() call to set up a menu attached to a recently
>opened window (in the custom screen, of course).
>
>The problem now...
>
>I haven't been able to discover how to control the highlight
>color which appears when proceeding to select a menu item.
>Note that I am talking about the color which appears when
>you move the mouse pointer over the menu name in the top
>line of the screen, and NOT the color which appears when you
>select a menu item in the body of the menu when you have 
>the HIGHCOMP flag set.
>
>The color which appears currently is a light green, which is
>very hard on the eyes, since the foreground (?) color is
>white.
>
>Please help!!
>
>Sean Lewis
>...sdcsvax!sdcc6!ir470

The highlighting of a menu item in the bar is done by complementing a box
containing the menu name.  In a five-bitplane screen, color 0 will become
color 31 (decimal).  So, if the bar background is color 0, make 31 be other
than ugly using the SetRGB() and LoadRGB() family of graphics functions.

As for picking the colors of menu bar text, here is the code where Intuition
sets up a local IntuiText structure to be used to render the menu titles:

	 IT.FrontPen = w->DetailPen;
	 IT.BackPen = w->BlockPen;
	 IT.DrawMode = JAM2;
	 IT.TopEdge = s->BarVBorder;
	 IT.LeftEdge = s->BarHBorder;
	 IT.ITextFont = s->Font;
	 IT.NextText = NULL;

note that w is a pointer to the active window, s is a pointer to that window's
screen.  Note that JAM2 and BackPen well, Sean.

Hope this helps.  Any other comments on this?
			jimm