Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - crbn-hash

Pages: [1]
1
Window / Re: Using Views for Multiple Levels
« on: May 01, 2020, 07:04:41 pm »
Right! But I would like to scroll vertically instead of horizontally. Moving the drawing everytime it hit the window limits would be a lot of extra logic.

2
Window / Re: Using Views for Multiple Levels
« on: May 01, 2020, 06:42:22 pm »
The train track length will be dynamic and rendered based on different map files that are fed to the program, so I can't assume it will fit in the initial window ie.

window with tracks extending outside of it
_______________________
|====================================================                                       
|                                        |
|                                        |
|                                        |
|______________________|

versus

_______________________
| ================ |
| ================ |
| ================ |
| ======                         |
|______________________|

3
Window / Using Views for Multiple Levels
« on: May 01, 2020, 05:49:29 pm »
I'm looking to display a train track that extends horizonally out of the window. I would like to display the track as wrapping, and thus be able to scroll up and down to view the full length of the track - instead of including logic that would break the track up as it is rendered.

I would think that I could define a second view which contained the track outside the window, and then set a viewport stacked under the default view:

View view1 = getDefaultView();                             //contains first portion of track
View view2(offscreen  track x, offscreen track y);    //contains second portion of track

view2.setViewport( 0 , offset from view1.y);           //display second portion of track underneath first portion
                                                                          //scroll down to view this portion

I've consulted:

https://en.sfml-dev.org/forums/index.php?topic=11526.msg80208#msg80208

https://en.sfml-dev.org/forums/index.php?topic=23574.0

and a few other threads to no avail.

Thanks for any input!

Pages: [1]