1
Graphics / Re: Global bounds of object inside RenderTexture inside RenderWindow
« on: May 21, 2019, 12:57:52 am »Hi!
Since the button object doesn't actually exist on the window - its visual representation is only a part of the texture used to draw the render texture to the window - no, not directly. You can, of course, calculate where it should be in relation to the render texture.
One other thing you could do is set up different views to represent the render textures and then use each of those views for the co-ordinate conversion.
So, set up - in addition to the normal window view - a view that places the co-ordinates of the render texture aligned with where they would be in the window. You could use a view's viewport to help with framing. Then, convert the mouse position to each view depending on which one you are comparing.
I had really short schedule for completing the project so in the end I was forced to just draw the button directly on the main window and live with it
I was hoping that there is easier solution since I don't have much experience with view and viewport so I didn't try your solution yet. Maybe in the future I could try it and report if that works
Thanks for the help anyway!