Page 1 of 3

GadTools IM_MENU shortcuts

Posted: Wed Jul 02, 2014 2:29 pm
by chris
There seems to be some strange interaction between image menus and shortcuts.

In the attached examples, "shortcut2" has an image menu with a shortcut. The letter associated with that shortcut changes font when the entry is highlighted. There is no way of getting the AmigaKey image or the letter to actually highlight either.

A related problem, in "shortcut", we have a menu with a shortcut, and an image menu item without. The image menu always gains space to pad it out with the missing amigakey icon. I think this is fine, however again there is no way of getting that extra space to highlight when the user is over that entry.

So, to summarise:
An image menu item with a shortcut has the wrong font for the key needing to be pressed.
The space or image for the shortcut area does not highlight if the menu is an image menu item.

I haven't tried combining toggle select items with image menus yet :-)

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 1:29 am
by chris
Also it seems a little bit strange that the AmigaKey+shortcut is added to image menus automatically, but the sub-menu arrow is not.

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 9:57 am
by trixie
@chris

I already dread to imagine what I'll find working on that menu class :-D

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 11:42 am
by chris
trixie wrote:I already dread to imagine what I'll find working on that menu class :-D
You'll be fine with text menus - it's just the image ones have never worked until recently (broken for.. 22 years?!), so they haven't exactly been well tested. I think it's still only me who has tried to use them!

As an aside, I was thinking about my second point a bit more - how the AmigaKey area does not highlight - and there's a bit of an oddity in how the highlighting works anyway.

Only the area the image extends to gets highlighted (horizontally, vertically is fine). It would be far better if the entire menu item was highlighted, and I think that would solve that problem and make it easier to create image menus that look consistent.

I'd been padding them out with a fillrectclass of 0 height, which works but is somewhat ridiculous and doesn't solve the AmigaKey area problem.

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 12:23 pm
by salass00
chris wrote: So, to summarise:
An image menu item with a shortcut has the wrong font for the key needing to be pressed.
The space or image for the shortcut area does not highlight if the menu is an image menu item.
From doing some testing the former of these issues happens with non-BOOPSI as well as BOOPSI images while the latter one only happens with BOOPSI images (the highlight effect is done differently for these and seems to be restricted to the area covered by the image itself).

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 12:35 pm
by chris
salass00 wrote:
chris wrote: So, to summarise:
An image menu item with a shortcut has the wrong font for the key needing to be pressed.
The space or image for the shortcut area does not highlight if the menu is an image menu item.
the latter one only happens with BOOPSI images (the highlight effect is done differently for these and seems to be restricted to the area covered by the image itself).
Any reason for that? Surely the highlighting should be the same? Or at least the same size?

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 12:56 pm
by thomasrapp
chris wrote:Any reason for that? Surely the highlighting should be the same? Or at least the same size?
BOOPSI images can highlight themselves. Conventional images can't.

Re: GadTools IM_MENU shortcuts

Posted: Thu Jul 03, 2014 12:58 pm
by chris
thomasrapp wrote:
chris wrote:Any reason for that? Surely the highlighting should be the same? Or at least the same size?
BOOPSI images can highlight themselves. Conventional images can't.
OK, but there's still a dead zone which needs highlighting.

Re: GadTools IM_MENU shortcuts

Posted: Sun Jul 20, 2014 6:16 pm
by salass00
chris wrote: An image menu item with a shortcut has the wrong font for the key needing to be pressed.
This wrong font problem is now fixed in the latest beta intuition.library. The reason was that normally menu shortcuts use the same font as the menu item text but if it's an image menu item then this is not possible and it will fall back to topaz 8. I've changed it so that it now falls back to the screen font instead which is what gadtools.library defaults to as well unless it's overridden by the program.

Another problem which still also needs to be fixed is that if the image is too high then the shortcut text isn't aligned correctly with the amiga button image. I'll look into that later...

Re: GadTools IM_MENU shortcuts

Posted: Fri Jul 25, 2014 12:22 pm
by salass00
salass00 wrote: Another problem which still also needs to be fixed is that if the image is too high then the shortcut text isn't aligned correctly with the amiga button image. I'll look into that later...
Just fixed this.

Now looking into the different highlighting of BOOPSI images. The main reason seems to be that BOOPSI image menu items use HIGHIMAGE while non-BOOPSI ones use HIGHCOMP highlighting method. If I change it so that BOOPSI image menu items also use HIGHCOMP it leads to a hard crash when the menu is opened so maybe some code there doesn't like BOOPSI images...