From: RTillery@cup.portal.com (Rick - Tillery)
Newsgroups: comp.sys.amiga.programmer
Subject: Intuition Questions <-- Give me a hand?
Date: Sun, 12 Apr 92 13:59:10 PDT
Organization: The Portal System (TM)
Distribution: world

I'm working on a program that I need some assistance on.  Here are my
problems:

(Note:  The program must work under 1.3 and 2.0 equally.  If there is
 a necessity to handle 1.3 and 2.0 differently, that is not a problem,
 but I need to know that.  All solutions MUST be as system friendly as
 possible.)

1-  I am opening a HAM screen with a fixed base palette.  I have set
    the DetailPen and BlockPen on the window and screen so that the
    menus are the colors that I want.  However, on the screen I have
    a proportional gadget that takes on colors based on these values
    that are NOT what I want.  I know there are programs that use
    custom images for proportional gadgets (although I don't know if
    that is only available under 2.0), but I have had no luck doing
    this myself.  If someone could provide some code that did nothing
    more than allow me to change the _color_ of the handle and the
    slider area in whatever method necessary (I _would_ like the
    handle size to be variable, but that isn't a necessity), I think
    that would solve this problem.

2-  The screen I'm opening is barely an overscan screen.  I have the
    following code that does a good job of centering it under both
    1.3 and 2.0:

      void SetOverscan(struct Screen *screen)
      {
         WORD rows = GfxBase->NormalDisplayRows,
              x=screen->Width, y=screen->Height;
         struct ViewPort *vp=&(screen->ViewPort);
         
         if(rows>300) rows>>=1;
         x -= 320;
         if(vp->Modes & HIRES) x-=320;
         y-=rows;
         if(vp->Modes & LACE) y-=rows;
         x>>=1;
         if(x<0) x=0;
         y>>=1;
         if(y<0) y=0;
         if(y>40) y=40;
         if(vp->Modes&HAM)
         {
            if(GfxBase->ActiView->DxOffset-x<96)
               x=GfxBase->ActiView->DxOffset-96;
         }
         vp->DxOffset=-x;vp->DyOffset=-y;
         RemakeDisplay();
      }
    
    Unfortunately, my 3000 didn't come with 1.3 so I had to find a friend
    with 1.3 to check what I've created so far.  Under 1.3, the screen is
    properly centered, but all the gadgets are activated from positions
    relative to the screen's initial position (in this case the screen is
    336x400 and is 8 pixels to the left, so the gadgets are all activated
    8 pixels to the right of where they appear on the screen).  Does
    anyone know what value must be altered under 1.3 to move the gadget
    hot boxes over as well?  Or perhaps I need to use a different
    centering routine under 1.3...?
    
3-  As I said, the screen is a HAM screen.  As a result, menus and some
    gadgets that I can't control selected images, compliment all 6 bit-
    planes when they are selected.  This means that although my first
    4 colors are professional looking gray shades (as designed), the
    selected gadgets turn colors and these are mostly VERY bright ones
    that don't show up at all in some cases (on a white background, a
    hold-and-modify green as complimented to provides a white on white
    non-contrast color combination).  This mostly relates to the slider
    gadgets mentioned above since the boolean gadgets can use border
    structures.  Also, the menus show an annoying green highlight box
    in the menu as well as on the menu bar.  Is there some way to tell
    intuition to only compliment the first two bitplanes rather than
    all 6?  Is there some way to open a HAM screen and then tell the
    system that it is actually a 2 bitplane screen...then do all my
    selecting in those first 2 bitplanes and return the screen to it's
    initial configuration before closing?  How many rules does this
    break :-) ?
    
4-  Back to my color problem, I have some string gadgets on the screen
    that use a HAM'd color (gray->green) for the cursor.  What can I
    do to change that color?
    
5-  I forgot to check under 1.3, but does the system automatically place
    the "Amiga" key symbol in the menus when a shortcut is specified?
    In either case, what defines that symbol, and is there a way I can
    change it so that it will come closer to matching my low res,
    interlaced pixel aspect ratio?
    
I guess that's about it (isn't it enough?) for now.  If you have any
answers, suggestions or comments, PLEASE feel free to send them along.
I've already fixed several problems I had based on offhand comments
from other folks, so what you might think wouldn't help...might :-)


Rick Tillery
(RTillery@cup.portal.com)