Hi,
the goal/problem is this: I need free space around the game (top, right, bottom and left) to display banner ads and/or a navigation bar. Unfortunately, these elements need to be on top of (over) the game, so I need to make sure these don't overlap any game UI elements.
For the bottom and right side it's pretty easy: I just reduce window.innerHeight and window.innerWidth by x pixels after export and the game thinks it's smaller and adjusts accordingly. No problem!
For the top and left side this works in some frameworks with marginTop and marginLeft (so moving the canvas further down or to the right). But not in Construct 3. This is where a pointer issue occurs. When you click on a button (as an example), the new (visual) position of the button is not taken into account, but the original one. Not good :)
Questions:
1.) Is there a way to solve this pointer issue after exporting? So to let the subsequently set values of marginLeft and marginTop flow into other variables?
2.) If this has to be solved in the game. What would be the most elegant method?
I tried adding a spacer. In landscape it should be on the left side (width of x pixels, full height) and in portrait mode at the top (full width, with x pixels height).
Is there a behavior that could make this easier for me?
I tried this manually:
On the one hand, I have problems setting the full width/height, and on the other hand, the value for height or width (e.g. 100px) seems to get smaller or larger when resizing. In short, it doesn't seem to work front or back.
My goal? If I have a spacer, I could position the UI element based on this spacer.
Basically, this seems to be a very complicated and time-consuming method. Isn't there an easier way?
Thanks a million in advance!