New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for drawing in any surface. #34
Comments
I'm not sure I understand exactly. Could you please provide some code to replicate the issue? |
Here is some example code that illustrates what I mean. There are 4 buttons.
To get a workaround going for the sub2 case (surface drawn into another one) the only way is to manually track all the offsets from each surface all the way to the top level. I didn't put this case here, but I think this library shouldn't support this case because it'll make it cumbersome to do. You would have ask the user for the abs offset, I don't think you can get it automatically from anywhere.
|
I fixed the subsurface case, by making the 'contains' method take into account the absolute offset. I agree that the sub2 case should not be handled, as offsets would need to be handled manually. |
Right now the code expects the widget to be drawn in the display surface. If I draw it in another surface it doesn't understand the widget's position relative to the top level display surface only to the "local" surface and it doesn't handle mouse events properly.
The text was updated successfully, but these errors were encountered: