CSS overflow
rickierich

Why can't I use scroll bars with wade.

 

I have making a scene that adds scene objects dynamically, some of the sceneobjects(textsprites) are printed of the screen and there is no way to add a scroll bar properly. When I do add a scroll bar the sprites set to a position of screen are lost. I want it this way because on mobile devices it will work the way people expect it to work.

All 2 Comments
Gio

You can use scroll bars if that's what you want, but I wouldn't recommend it. Just set the windowMode property of your scene to 'container'. It's in the scene properties section of the editor, or if you want to do it from a script, you can use wade.setWindowMode('container').

When you do that, wade will not try to resize the scene to fill your device's screen. Instead, it will only fill the parent container (such as a div), and you can control its size and overflow property with css.

However this is highly inefficient, because you are drawing a scene that is not even visible to the user (only a part of it is visible, but you're drawing all of it). A much better approach is to have the wade scene that is as big as the screen (the default behavior), and then add SceneObjects that act as scroll bars by changing the camera position.

rickierich

I will do your approach. Thanks for your time and giving me an approach.

 

Post a reply
Add Attachment
Submit Reply
Login to Reply