[Patch] Improved Build Station GUI [r19159]

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

2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

This should work and be put in to trunk its a great patch and works a dream no bugs
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Improved Build Station GUI

Post by planetmaker »

The latest update can be found in our svn repository (tortoise might have problems, though): http://trac.openttdcoop.org/browser/too ... rt/patches

This - like all existing versions to my knowledge - has at least one bug: you cannot scroll the station tile list with the mouse wheel (only the scrollbar works there). There's a good suggestion by Zuu further up in this thread on how to tackle that, but I haven't gotten around to it yet.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, info@openttdcoop.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

on all them links
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Improved Build Station GUI

Post by planetmaker »

try again. There are currently some memory issues...
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

yer it worked now :)
For Community Integrated Version http://code.google.com/p/civopenttd/
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

what has changed in it or is it just an update
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Improved Build Station GUI

Post by planetmaker »

Might be an unnecessary update. No functional changes.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

some thing has changed in the rail_gui.cpp need a bit of updating

I am going to try my best here
For Community Integrated Version http://code.google.com/p/civopenttd/
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

C:/msys/1.0/home/Alainspc/ottdsrc/trunk/src/rail_gui.cpp:1608: error:
`_imp_newstation_builder_desc' must be initialized by constructor, not by `{...}'
make[1]: *** [rail_gui.o] Error 1
make[1]: Leaving directory `/home/Alainspc/ottdsrc/trunk/objs/release'
make: *** [all] Error 2


this is what i am getting come up
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: [Patch] Improved Build Station GUI

Post by Timitry »

Well, i'm only just in the beginning of learning c++, but by looking at the last available .diff, i'd say that "_imp_newstation_builder_desc" is "const", and constants can only be initialized in the constructor of classes, like it says in the error message... It usually looks something like:

Code: Select all

class StationBuild
{
public:
   StationBuild(variable(s))      //The constructor
      : _imp_newstation_builder_desc (variable(s))     //Initializing the what-ever-it-is
   { 
   ...
   }

...
}
But again, i only know very little c++, so that might be quite wrong...
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: [Patch] Improved Build Station GUI

Post by 2007Alain2007 »

here is an update of this patch :) hope it works all ok
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: [Patch] Improved Build Station GUI

Post by Timitry »

Great Patch, here are win32-binaries, just made a quick test, seemed to work okay :)
Attachments
NewStationBuildGUI_r15760_win32binaries.7z
(2.65 MiB) Downloaded 175 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Improved Build Station GUI

Post by planetmaker »

update to trunk r15776 w/o functional changes
Attachments
station_build_gui_r15776.diff
station build gui for r15776
(22.24 KiB) Downloaded 168 times
scoz
Engineer
Engineer
Posts: 19
Joined: 21 Dec 2008 09:22

Re: [Patch] Improved Build Station GUI

Post by scoz »

Salutations! Anyways after school resumed my free time was reduced to none, so I had to abandon this for a bit <_< Anyways I'm free again and plan to have a patched version including scrolling and resizing finished within a week(maybe even tonight, possibly). Thanks to those who kept it updated while I was absent, it shouldn't happen again :)
scoz
Engineer
Engineer
Posts: 19
Joined: 21 Dec 2008 09:22

Updated [Patch] Improved Build Station GUI

Post by scoz »

Version 3 out. Updated to nightly, resizing, scrolling, tooltiping, and in theory shouldn't break everything :D

First post updated.
User avatar
siu238X
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 13 Sep 2004 18:54
Location: Hong Kong, China

Re: [Patch] Improved Build Station GUI

Post by siu238X »

Apart from the graphical thing, could these fancy stuff be functional, such that only stations with some particular structures can load / unload certain kind of cargo?
Image
Image
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [Patch] Improved Build Station GUI

Post by CommanderZ »

siu238X wrote:Apart from the graphical thing, could these fancy stuff be functional, such that only stations with some particular structures can load / unload certain kind of cargo?
This is not aim of this patch :)

I guess it now does everything it should do. Now just chatch all bugs (if there are any), polish coding style and offer it to the devs :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Improved Build Station GUI

Post by planetmaker »

It's not bug free (scrolling not working quite as it should) and needs updating to current trunk, probably with incorporation of using nested widgets. Anythings beside GUI stuff certainly is beyond the scope of this patch.

EDIT: didn't see the update. Will have to try that :D
scoz
Engineer
Engineer
Posts: 19
Joined: 21 Dec 2008 09:22

Re: [Patch] Improved Build Station GUI

Post by scoz »

planetmaker wrote:probably with incorporation of using nested widgets.
Yeah I've noticed this change a lot in newer revision notes, gona have to figure out what its all about. I figure that may be appropriate for a separate patch? I seem to remember devs posting somewhere that they prefer patches to be more focused at fixing a single issue at a time.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [Patch] Improved Build Station GUI

Post by planetmaker »

scoz wrote:Yeah I've noticed this change a lot in newer revision notes, gona have to figure out what its all about. I figure that may be appropriate for a separate patch? I seem to remember devs posting somewhere that they prefer patches to be more focused at fixing a single issue at a time.
"One feature at a time" doesn't mean that a single patch (as this one) shall not make use of the possibilities trunk offers - on the contrary. So, I think, using nested widgets here, might be advantegous: IMO there's quite a natural order to the widgets in this case, especially considering that this patch mostly replaces one widget type by another (text scroll vs. graphic scroll through available stations).
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests