smarthaert / phoenixlib

Automatically exported from code.google.com/p/phoenixlib
0 stars 0 forks source link

Polygon Collision is not working as expected (Mouse Enter show works also). #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have fixed this!

Please change in
Function TPHXContainer.ComponentAt(X, Y: Integer): TPHXControl;
    If ((Current.PointInControl(X,Y)) or (PointInRect( X,Y, Current.ClientRect ))) then
    begin;
      Result:=Current;
      Exit;
    end;

and

function TPHXGuiEngine.ComponentAt(X, Y: Integer): TPHXControl;

    if Current.Visible and ( Current.PointInControl( X,Y) or  PointInRect( X,Y, Current.ClientRect )) then
    begin
      Result:= Current;
      Exit;
    end;

Original issue reported on code.google.com by wagenhei...@gmail.com on 16 Nov 2010 at 9:14

GoogleCodeExporter commented 9 years ago
It should be 

if Current.Visible and Current.PointInControl(X,Y) everywhere (PointInControl 
tests both polygon and bounding rectangle)

Original comment by andreas....@gmail.com on 18 Nov 2010 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 8 Aug 2013 at 2:11