G'Day, people. Ive finnaly had some limited time to sit down and look at the oTTD code and thought that I would attempt something semi-simple. (although in the end it turned out to be a little more thought required)
Attached should be a patch against SVN revision 532 for adding basic support for window snapping. eg. you can move one window next to another and it will snap to the edge of the existing window. This is good for aligning the windows in a toolbar effect without having to attempt to get it down to each indvidual pixel.
Before I post it to SF I would like some people to test it and give me any ideas/thoughts/bugs. (including comments on how to fix the rather largish code in order to do it)
Some notes:
* There are some edges it dosnt snap with,
* Right edges of both windows going right.
* Bottom edges going down
* The snapping is done based on the corners (not the border) if someone can think of a way to do the whole border effectivly please let me know
Hope it prooves usfull to someone besides me...
Window snapping
Moderator: OpenTTD Developers
Window snapping
- Attachments
-
- windowsnaps.patch
- The patch, sorry I run Debian linux so no Windows EXE
- (4.59 KiB) Downloaded 327 times
Cant have been that bad, tron (aka detron) applied a version to SVN. (r538) however it does miss a couple of the additional snapping features mine included for aligning the windows. So ive made an additional patch against r538 with these in it.
https://sourceforge.net/tracker/index.p ... tid=636367
Im still waiting for some critisim to the patch however. (eg. thoughts or suggestions (eg. should it allow to snap the moving windows right border to the others right border... I havnt done this as I dont think its used or at least would be to difficul to manage)
Edit: maybe this topic should be moved to the General OpenTTD now? (mods?)
https://sourceforge.net/tracker/index.p ... tid=636367
Im still waiting for some critisim to the patch however. (eg. thoughts or suggestions (eg. should it allow to snap the moving windows right border to the others right border... I havnt done this as I dont think its used or at least would be to difficul to manage)
Edit: maybe this topic should be moved to the General OpenTTD now? (mods?)
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 19 guests