Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Oct 17, 2017 8:40 pm

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Window snapping
PostPosted: Tue Nov 09, 2004 12:40 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jul 02, 2004 1:15 pm
Posts: 115
Location: NZ
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...


Attachments:
File comment: The patch, sorry I run Debian linux so no Windows EXE
windowsnaps.patch [4.59 KiB]
Downloaded 235 times
Top
   
 Post subject:
PostPosted: Thu Nov 11, 2004 12:07 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jul 02, 2004 1:15 pm
Posts: 115
Location: NZ
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?)


Top
   
 Post subject:
PostPosted: Fri Nov 12, 2004 12:47 am 
Offline
Tycoon
Tycoon

Joined: Sat Jun 12, 2004 12:37 am
Posts: 1393
Location: United Kingdom of Great Britain and Northern Ireland
I think only the devs and a few others can test out patches (us mere-mortals can't apply patches. all that recompiling tripe. give me a scripting language any day. ;) )


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.