Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Mar 19, 2019 5:04 am

All times are UTC




Post new topic  Reply to topic  [ 43 posts ]  Go to page 1 2 3 Next
Author Message
 Post subject: Patch: New orders window
PostPosted: Tue Mar 20, 2007 6:47 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
I'm a big friend of usability, so here are my 10 pence.

Move order and skip to order is in trunk now! :)

This patch changes the text buttons for the main actions to icon buttons (the cursor is also changed).

The grf should be placed in the data path. (NO newgrf!!)


Attachments:
New Dehli Xpress, 27th Oct 2364.png
New Dehli Xpress, 27th Oct 2364.png [ 42.56 KiB | Viewed 5698 times ]
order_gui_icons_r10783.patch [26.54 KiB]
Downloaded 111 times
cur_n_ico.grf [1.57 KiB]
Downloaded 113 times

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Last edited by skidd13 on Sat Aug 04, 2007 11:39 pm, edited 46 times in total.
Top
   
 Post subject:
PostPosted: Wed Mar 21, 2007 10:19 am 
Offline
Engineer
Engineer

Joined: Mon Dec 25, 2006 5:05 pm
Posts: 127
always wanted something like that, thanks! =)

_________________
English is not my native language, so please excuse me if I sometimes might appear a bit harsh or if I make a spelling or grammar mistake!


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2007 11:01 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Apr 24, 2004 10:43 am
Posts: 2007
Location: Venezia - Italia
great,
Quote:
always wanted something like that, thanks! =)
me too :D

_________________
ImageImage
ImageImage
ImageImage
newgrf tests, see: newgrf test topic, my patches: Wolf01's Hire Point
Italian TTD Forum
Wiki Page


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2007 12:03 pm 
Offline
Engineer
Engineer

Joined: Mon Jan 17, 2005 1:11 pm
Posts: 57
Hey thats really a great improvement! Saves quite some time and click-work.

_________________
Image
Image
#openttdcoop blog | #openttdcoop wiki | #openttdcoop sandbox server | #openttdcoop sandbox server archive | #openttdcoop mainserver | #openttdcoop mainserver's archive | #openttdcoop networking guides | IRC applet


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2007 1:16 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
Good to hear that my idea is well recieved. :)

Mucht wrote:
Saves quite some time and click-work.
That's why I started to code this.

I'm thinking over the button placement:
In the icon-button-bar should only be the most used buttons (only 3-4).
The text-button-bar should include the remaining buttons.
Goto and skip should really be in the icon-button-bar.
Now the question is which button(s) is needed often too?

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2007 6:23 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
Patch updated.
Now full functionality should be availible. Now it's only style (I hope).

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Wed Mar 21, 2007 8:38 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Apr 24, 2005 9:21 pm
Posts: 387
Location: Torquay, England
How about drag&drop? ;)


Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 1:11 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
iNVERTED wrote:
How about drag&drop? ;)
I'm working on it. But it's a bit difficult, cause I need to replace bigger parts of the GUI!

Patch updated!

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 1:14 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
Last update contains a bug, current version too.
The crash appears when you move the first order down.
ATM I can't understand why the game crashes.

I draft a small image which contains the linked order list.

vO = v->orders
O1 = first order
O2 = 2nd order
O3 = 3rd order

Somehow "New move from 01 to 02" crashes the game. :(
Please can someone help me. Thanks


Attachments:
move_order.png
move_order.png [ 29.2 KiB | Viewed 9229 times ]

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Last edited by skidd13 on Sat Mar 24, 2007 4:11 pm, edited 1 time in total.
Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 2:50 pm 
Offline
Engineer
Engineer

Joined: Mon Nov 14, 2005 1:14 pm
Posts: 62
Location: Paris, France
Hello skidd13,

There was an infinite loop in the order list when you move the first order down

Replace these two lines
Code:
SwapOrders(v->orders, one_past);
v->orders->next = moving_one->next;

by
Code:
v->orders = moving_one->next;


If you want, here you can my diff, I create one command CMD_MOVE_ORDER and delete CMD_ORDER_MOVE_UP and CMD_MOVE_ORDER_DOWN.
If the bit 8 of param p2 of the cmdMoveOrder function is set to 1 so we move the selected order up else we move it down.


Attachments:
move_order_9417.diff [26.8 KiB]
Downloaded 219 times
Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 4:15 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
nycom wrote:
Hello skidd13,
There was an infinite loop in the order list when you move the first order down.
Thanks a lot.

nycom wrote:
I create one command CMD_MOVE_ORDER and delete CMD_ORDER_MOVE_UP and CMD_MOVE_ORDER_DOWN.
If the bit 8 of param p2 of the cmdMoveOrder function is set to 1 so we move the selected order up else we move it down.
I was on the way to merge the two commands, cause of the Drag and Drop functionality.

Patch Updated!

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Mon Mar 26, 2007 6:46 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
Another update!

FIXED:
- current order stay's selected
- shared orders sync crash

TODO:
Get Drag&Drop working + clean up code.

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Wed Apr 04, 2007 8:58 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sat Jun 11, 2005 10:32 pm
Posts: 48
Location: Oslo - Norway
How do i install this magnificent patch?


Top
   
 Post subject:
PostPosted: Thu Apr 05, 2007 11:03 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
bkLife wrote:
How do i install this magnificent patch?
Hm, I read the question a 100 times...

Please search first!
There is a reason why in the development topic is a sticky called Howto apply a patch/diff file!
Or search in the manual (read point: 2 Source code)!

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Mon Apr 30, 2007 12:01 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
patch updated!

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Wed May 02, 2007 1:17 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Mon Apr 30, 2007 10:26 am
Posts: 141
Instead of programming a new feature you could always drag the orders arround like you could in TTDX!

[edit] thats strange, you could do it in the original TTDX, but not in OTTD! oh well keep up the good work..


Top
   
 Post subject:
PostPosted: Wed May 02, 2007 5:17 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
doghousedean wrote:
Instead of programming a new feature you could always drag the orders arround like you could in TTDX!

[edit] thats strange, you could do it in the original TTDX, but not in OTTD! oh well keep up the good work..
The function could itself handle drag and drop actions. But to tell the GUI to accept this is quite difficult (Cause lack of documentation and free time). I've tried it a few times but failed allway's. So I stick to this solution.

Patch updated. Missed a damned segfault last time. :evil:

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Fri May 04, 2007 10:53 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
I tried to implement drag and drop once again.
Somehow the event WE_DRAGDROP is never called.
I don't get the problem, can someone help to improve. Thanks.

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 10:09 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jul 02, 2004 1:15 pm
Posts: 115
Location: NZ
Ok, this is not entirely for the GUI, but could you add the ability to select an existing orders window and copy/share it.

It would make converting between rail types quicker.

Additionally, if you get drag and drop working will we be able to drag from one order set to the other. (eg. move an order between vechs)


PS. Are the busess making money? You sure have a lot.


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 3:24 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Thu Mar 03, 2005 10:49 am
Posts: 522
Location: Germany
nzhook wrote:
Ok, this is not entirely for the GUI, but could you add the ability to select an existing orders window and copy/share it.
Click on the vehicle does the job either.

nzhook wrote:
Additionally, if you get drag and drop working will we be able to drag from one order set to the other. (eg. move an order between vechs)
Drag and drop is such a thing in OTTD, adding a button or changing it's behavior is quite simple, but I don't get this damned drag and drop working.
Draging a order between two vehicles would require more work than it's worth. IMO (ATM) :)

nzhook wrote:
PS. Are the busess making money? You sure have a lot.
Why should they?! It's just for testing. :)

_________________
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 43 posts ]  Go to page 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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-2019 phpBB Limited

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