I have a draggable object in my game, and the object has the behavior 'Bound to layout' making it stay on screen when dragging over the edges.
I want my game to support multiple screen sizes and portable devices, so I've set the background layer to parallax(0,0) and added the anchor behavior (so that the background stretches over the whole screen when fullsized in scale mode). I also have some HUD buttons in each corner, anchored so that they stay in the corners when resizing/scaling.
However, the layout itself isn't stretched over the screen, so the draggable object is still bounded the the small layout (see image below, the blue area).
<img src="https://dl.dropbox.com/s/zx6i1z671kwn856/scalescreen.png" border="0" />
The red draggable object is bound to the blue area, but I would like it to be draggable over the whole screen (blue+green) but still be bounded by the edges.
I've tried adding solid edges manually, but then the draggable object would 'jump' over the edges when moving the mouse outside the edges, making the object disappear outside the screen.
What is the best way to make the draggable object bound to the screen? Something that works when the game is scaled.
Thank you!