Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jan 16, 2019 11:15 am

All times are UTC




Post new topic  Reply to topic  [ 160 posts ]  Go to page 1 2 3 4 58 Next
Author Message
PostPosted: Wed Dec 31, 2008 9:20 am 
Offline
Engineer
Engineer

Joined: Sun Dec 21, 2008 9:22 am
Posts: 19
All hail sbr, the mighty renewer.

Check:
viewtopic.php?p=864002#p864002
For an awesome updated version.

Image


Last edited by scoz on Fri Mar 12, 2010 6:58 pm, edited 14 times in total.

Top
   
PostPosted: Wed Dec 31, 2008 9:35 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Nov 16, 2008 10:57 am
Posts: 289
Location: Belgium
Does your binarie have daylenght patch?


Top
   
PostPosted: Wed Dec 31, 2008 9:36 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 07, 2008 6:29 pm
Posts: 1872
Location: Czech Republic
:shock: Why didn't anyone make this sooner? It is now so obvious, how user un-friendly the default station UI is...

And congratulations to a very nice start on TT-forums :)

EDIT: Is the window resizeable? it would be very nice if it was :)


Top
   
PostPosted: Wed Dec 31, 2008 10:13 am 
Offline
Engineer
Engineer

Joined: Sun Mar 23, 2008 8:53 am
Posts: 80
If the window could be made resizable, could you make it so that the dropdown list risizes, so that one could read the whole text :p


Top
   
PostPosted: Wed Dec 31, 2008 10:21 am 
Offline
Engineer
Engineer

Joined: Sun Dec 21, 2008 9:22 am
Posts: 19
CommanderZ wrote:
EDIT: Is the window resizeable? it would be very nice if it was :)

Resizeable as in the more width added more station buttons would appear, and more height adds station buttons and station classes as well?

I'll add that to my list(which is very small, so I'll work on it soon :p) but I don't know how doable it would be 'hmmm
My first guess is there's no easy way to add/remove widgets runtime(currently the station buttons are each their own box that can be raise/lowered) so to keep the nice buttony look I'd probably have to create a max size and just hide the widgets until the window is big enough to show them. If you could help me find a window that uses actual separate widgets and add/removes em or if you know how I could definitely do it this way.

Or other idea would be to use a matrix for the buttony look, and just draw a white line around the station when its selected maybe. I could look at the code from the company vehicle window as far as changing the divisions in the matrix.

Or somebody could point me towards another solution :p My grasp of this windowing system is almost nil, so much room for more knowledge and ideas.

<Post added edit>

That would be another idea, to just let the list resize and keep the bits below the list just centered or something. Or I could reshuffle it in to a bit more width friendly default layout.


Hamilton2007 wrote:
Does your binarie have daylenght patch?

Made myself a note. Just trunk+daylength or cargodest+daylength? Or should I post the builds I use which is cargodest+daylength+ITiM+distant_join? :p

Anybody know if the only things I need to include are the exe and english lang file?


Last edited by scoz on Wed Dec 31, 2008 10:26 am, edited 1 time in total.

Top
   
PostPosted: Wed Dec 31, 2008 10:55 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 07, 2008 6:29 pm
Posts: 1872
Location: Czech Republic
Quote:
Resizeable as in the more width added more station buttons would appear, and more height adds station buttons and station classes as well?


Exactly

Quote:
Anybody know if the only things I need to include are the exe and english lang file?


You should include everything from the /bin folder from the source package and your openttd.exe, the strgen.exe is not necessary. If you have modified strings, ithen it is of course not necessary to provide obsolete language files you didn't adjust to your changes. If you don't provide the /data directory, then anyone who wants to try your mod needs to download the nightly too and use its /data.

Btw, does your GUI show the names of the station tiles somewhere (as tooltips or so)?


Top
   
PostPosted: Wed Dec 31, 2008 11:24 am 
Offline
Director
Director

Joined: Thu Jul 28, 2005 9:31 am
Posts: 536
Whooo, a cargodest+Itim+this patch+distant_join+daylength would be marvellous!


Top
   
PostPosted: Wed Dec 31, 2008 11:50 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 31, 2004 9:09 am
Posts: 290
Location: Denmark
MJS wrote:
Whooo, a cargodest+Itim+this patch+distant_join+daylength would be marvellous!


X2 i would like that very much indeed

_________________
TDH


Top
   
PostPosted: Wed Dec 31, 2008 11:55 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Thu Mar 04, 2004 12:47 pm
Posts: 374
Location: Veenendaal, The Netherlands
Image
When will this be in de trunck ;)
Very nice! 8o


Top
   
PostPosted: Wed Dec 31, 2008 12:09 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
I just have no comment on this patch. It's just great!

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
   
PostPosted: Wed Dec 31, 2008 12:37 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13183
Location: The Netherlands
FooBar wrote:
I just have no comment on this patch. It's just great!

I agree. Oh wait, that is a comment ;).

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
PostPosted: Wed Dec 31, 2008 12:41 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Feb 09, 2006 7:15 pm
Posts: 3815
You can, at runtime, add widgets to a window. Window::widgets contains a malloced array of widgets and when you realloc it and add stuff to the end and redraw the window it should "just" work assuming you're adding the widgets with the right size/location.

Furthermore I suggest that you do not create binaries with other patches than your own applied as it'll only cause incompatible clients/servers when someone compiles your patch and when someone uses your build, which makes properly testing harder.


Top
   
PostPosted: Wed Dec 31, 2008 12:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 24, 2003 6:45 pm
Posts: 3053
Location: Hong Kong
I concur :bow:

However do you have a screenshot when using the 'default station' or station layouts that don't have many choices?
Adding resizing is easy, but since window sizes aren't remembered it's pretty useless imho. However extending this functionality to Road/Air and Docks would be desirable if the GUI isn't unified already (don't know).

Someone should commit this :)

_________________
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."


Top
   
PostPosted: Wed Dec 31, 2008 12:50 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Nov 16, 2008 10:57 am
Posts: 289
Location: Belgium
Rubidium wrote:
Furthermore I suggest that you do not create binaries with other patches than your own applied as it'll only cause incompatible clients/servers when someone compiles your patch and when someone uses your build, which makes properly testing harder.


I don't understand exactly what you are saying, but i mean, the russian patchpack works perfect. :)


Top
   
PostPosted: Wed Dec 31, 2008 12:55 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 07, 2008 6:29 pm
Posts: 1872
Location: Czech Republic
Quote:
Adding resizing is easy, but since window sizes aren't remembered it's pretty useless imho.


It is not useless. Imagine you want to build a large station. You could resize the window alongside left or right side of the screen, so all the station tiles (and station tile categories) would fit there, so scrolling would be unnecessary. This way you could build the stations effectively and it would be a lot more fun than now.


Top
   
PostPosted: Wed Dec 31, 2008 2:46 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Feb 09, 2006 7:15 pm
Posts: 3815
Hamilton2007 wrote:
I don't understand exactly what you are saying, but i mean, the russian patchpack works perfect. :)
Any idea how many people complain about bugs in modified builds in the official bug DB? And how useless their savegames are for us as we can't open them? And how unlikely it is for us to hunt for bugs in an old modification of trunk? Not to mention people already complaining that the latest ECS doesn't work in their Russian patchpack.


Top
   
PostPosted: Wed Dec 31, 2008 3:38 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Nov 16, 2008 10:57 am
Posts: 289
Location: Belgium
Rubidium wrote:
Hamilton2007 wrote:
I don't understand exactly what you are saying, but i mean, the russian patchpack works perfect. :)
Any idea how many people complain about bugs in modified builds in the official bug DB? And how useless their savegames are for us as we can't open them? And how unlikely it is for us to hunt for bugs in an old modification of trunk? Not to mention people already complaining that the latest ECS doesn't work in their Russian patchpack.


Now i understand you :lol:

I rest my case :wink:


Top
   
PostPosted: Wed Dec 31, 2008 7:10 pm 
Offline
Engineer
Engineer

Joined: Wed Dec 31, 2008 7:00 pm
Posts: 6
Great patch! However, I've found a problem with the list of station types. After just starting the game the list is fine (every entry is shown once), but every time the station window is reopened, entries for all station types are added again. (So first there are 10 entries, upon opening it a second time those 10 are there now twice, etc.)
You seem to be assuming _railstation.station_classes and _railstation.station_class_count are reset each time BuildRailStationWindow is called, but they are not. I've hackishly fixed it in my local copy by doing:
Code:
if ( _railstation.station_class_count == 0)

before your for loop (around line 1026 of rail_gui.cpp), but I don't think that's actually the right way to fix it :-)

Also, the help text is wrong ('waypoint' should probably be 'station') :) Both problems can be seen in the screenshot:

Attachment:
File comment: two bugs in station gui
station_gui_bugs.png
station_gui_bugs.png [ 22.82 KiB | Viewed 26285 times ]


Edit: Perhaps I should note I'm using OpenTTD r14776 with daylength, custom station GUI and custom town count patches.


Top
   
PostPosted: Thu Jan 01, 2009 7:56 am 
Offline
Engineer
Engineer

Joined: Sun Dec 21, 2008 9:22 am
Posts: 19
Fixed bug found by TrainTraveller(thanks!) and it now recreates the list every time the window is opened(incase you add/remove newgrfs during the game or something?).

Station choice button tooltips are now the station tile name's. They have somewhat of a bug though, the strings provided in the newgrfs don't often have a {BLACK}(and/or they have another color) so the tooltip text shows up in some interesting colors sometimes :p (Seems to be pink/black/white for me) Is there a function out here for adding these color tags?

Rubidium wrote:
You can, at runtime, add widgets to a window. Window::widgets contains a malloced array of widgets and when you realloc it and add stuff to the end and redraw the window it should "just" work assuming you're adding the widgets with the right size/location.

How did I not see that <_> That makes things quite a bit easier.[/quote]

Anyways my plans for the next version are to make it resizeable(more station tiles) and reorganize the left part of the window to be a bit wider so the longer station class names can be seen. I'm hoping to have it done by the end of this coming weekend but it might get pushed till mid next-week(Classes start up again monday)

Updated .patch and screenshot(shows a station class with less than 10 stations) available in first post. No binary as the attachment limit is 4megz and the nightly is larger then that now it seems(at least using winzip compatible compression)


Top
   
PostPosted: Thu Jan 01, 2009 9:35 am 
Offline
Engineer
Engineer

Joined: Wed Dec 31, 2008 7:00 pm
Posts: 6
scoz wrote:
Fixed bug found by TrainTraveller(thanks!) and it now recreates the list every time the window is opened(incase you add/remove newgrfs during the game or something?).

Nice, thanks :-)
Any particular reason you are using:
Code:
_railstation.station_classes.erase(_railstation.station_classes.begin(), _railstation.station_classes.end());

Instead of just:
Code:
_railstation.station_classes.clear();


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

All times are UTC


Who is online

Users browsing this forum: Gliptal 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.