Hello.
I am currently making a level editor for my game.
I have simplified the capx to only show the editor portion.
You can find it here.
funnybunny.se/files/scroll.capx
I am currently fighting with the scrolling of content.
I found a thread on scrollbars here (I found another one but it was more flawed)
construct.net/en/forum/construct-2/beginners-questions-19/scrollbar-web-page-111884
And I used the content there and adjusted to my needs and also included a horizontal.
I really tried to figure out the values and adjusted to what's relevant for my project.
I am however struggling with two things. Naturally it all has to do with the calculations...
* Start the capx.
* Scroll far to the max on horizontal and/or vertical bars.
You can see the gray background at the bottom/right. I don't want to scroll onto the gray background. it should stop at the brown edge.
Second problem:
The original capx didn't really have anything to go for the max size of the content?
to showcase:
*Start the capx.
*Click on "NEW" button
* Enter map size width: 14, Height: 63. (the min and the max respectively) and click on OK.
Now try to scroll down as far as you can. You see it will stop before the area is finished.
I use LevelWidth and LevelHeight to set the size of the level area (the workable area) and the TOOLBAR is a "constant" of the Toolbar width.
Somehow I need to work these into the scrolling events.
But sadly I am not best at calculations.
So if you can help me solve these two problems above, I would be thankful!
I will also need to solve the "pan with hand" later on, but it will be a later problem. (Likewise with the dragging while painting/selecting marquee etc)