[solved] WhichLayer() with transparent windows

This forum is for general developer support questions.

[solved] WhichLayer() with transparent windows

Postby zzd10h » Mon Nov 16, 2015 9:19 am

Hi,
maybe somebody could help me.

I have a transparent window with a timer that periodically scan what is the
layer where the mouse is with WhichLayer.

If transparency level > 17, the layer is well detected. both on gadget or in
backgound of the window (spacer areas or transparent buttons area).

If transparency <=17 the layer is well detected over the gadgets BUT not
detected on the background of the window
.
In this last case, the detected layer is the one from window behind my window (other window or Workbench
screen)


Is somebody know if it's normal ?

I create my window with
Code: Select all
    SetRast(&alphaRP, TRANSPARENT_LEVEL);     // TRANSPARENT_LEVEL is from 0 (transparent) to 255 (opaque)


and I scan for Layer with

Code: Select all
    LockLayerInfo(&screen->LayerInfo);

    myLayer = WhichLayer(&(screen->LayerInfo),x,y);
   
    UnlockLayerInfo(&screen->LayerInfo);


On the attached picture, Layer is well detected when mouse is over a button but not when mouse is in an area between 2 buttons (only if transparent level is <= 17)

Thank you by advance
Guillaume
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
zzd10h
 
Posts: 546
Joined: Sun Sep 16, 2012 6:40 am
Location: France

Re: [solved] WhichLayer() with transparent windows

Postby zzd10h » Wed Nov 18, 2015 9:12 pm

Solution = WA_NoHitThreshold

Solved thanks to m3x.
Many many thanks :D
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
zzd10h
 
Posts: 546
Joined: Sun Sep 16, 2012 6:40 am
Location: France


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 4 guests