agamemnus wrote:... it should move!!!
Let me try to explain, why map movement actually does not work as you expect.
Earlier version of the train simulator did not have side views. There was just the main view at fullscreen. You could click and drag anywhere.
However, if you move the mouse pointer out of the program window, the FreeBASIC getmouse function always returns x=-1 and y=-1, so there is no control over the mouse position outside of the window. Drag-action naturally ends, if you move the mouse out of the train simulator window. I can't change that.
When implementing the side views, I had to separate the mouse pointer focus for every single view. Actually views are trated like completely independent windows. The view with the mouse focus is printed with a small white border to show, where the mouse is active. You can not click or drag outside of the active view.
Making things better
Actually I'm testing an "endless drag" mode, which can be activated by an init-file switch.
When active, the mouse cursor will be reset to screen center, when reaching the border at 20% distance. You can move the mouse endlessly into one direction and drag the map for a wide distance. That makes map movement intuitive and much easier.
Trains keep driving and you also can change the zoom level while moving the map - very funny.
You can also accelerate map dragging by seting "endlessdrag" to higher values. To allow pixel precise movement, you can set an acceleration level (number of pixel the mouse moved between two frames).
... it should move!!!
Code: Select all
(I love that picture from Lachie)
Look for Train Simulator V0.45 for download.