New Vehicle Window idea

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
ThunderAI
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 26 Nov 2003 09:15

New Vehicle Window idea

Post by ThunderAI »

I'm by no means a programmer, but how difficult would it be too add a sorting method on the new vehicle window that allowed you to sort the vehicles by some method, rather then the way they are currently default sorted.

For example, I want to sort my trains according to power to money ratio, etc.

Would two combo boxes with each rating be able to be added to the window and when you select a rating in each box it sorts by that ratio?
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Adding a sorter is relatively easy in OpenTTD. It's a matter of a few lines and, in your case, a good formula.

Sorter loops through the list and puts an item in its proper position depending on a given condition
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 32 guests