[Patch] Improved Build Station GUI [r19159]
Moderator: OpenTTD Developers
[Patch] Improved Build Station GUI [r19159]
All hail sbr, the mighty renewer.
Check:
https://www.tt-forums.net/viewtopic.php?p=864002#p864002
For an awesome updated version.
Check:
https://www.tt-forums.net/viewtopic.php?p=864002#p864002
For an awesome updated version.
Last edited by scoz on 12 Mar 2010 18:58, edited 14 times in total.
- Hamilton2007
- Transport Coordinator
- Posts: 289
- Joined: 16 Nov 2008 10:57
- Location: Belgium
Re: [Patch] Improved Build Station GUI
Does your binarie have daylenght patch?
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: [Patch] Improved Build Station GUI
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
And congratulations to a very nice start on TT-forums
EDIT: Is the window resizeable? it would be very nice if it was
Re: [Patch] Improved Build Station GUI
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
Re: [Patch] Improved Build Station GUI
Resizeable as in the more width added more station buttons would appear, and more height adds station buttons and station classes as well?CommanderZ wrote:EDIT: Is the window resizeable? it would be very nice if it was
I'll add that to my list(which is very small, so I'll work on it soon ) 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 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.
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?Hamilton2007 wrote:Does your binarie have daylenght patch?
Anybody know if the only things I need to include are the exe and english lang file?
Last edited by scoz on 31 Dec 2008 10:26, edited 1 time in total.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: [Patch] Improved Build Station GUI
ExactlyResizeable as in the more width added more station buttons would appear, and more height adds station buttons and station classes as well?
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.Anybody know if the only things I need to include are the exe and english lang file?
Btw, does your GUI show the names of the station tiles somewhere (as tooltips or so)?
Re: [Patch] Improved Build Station GUI
Whooo, a cargodest+Itim+this patch+distant_join+daylength would be marvellous!
Re: [Patch] Improved Build Station GUI
X2 i would like that very much indeedMJS wrote:Whooo, a cargodest+Itim+this patch+distant_join+daylength would be marvellous!
TDH
- habell
- Transport Coordinator
- Posts: 374
- Joined: 04 Mar 2004 12:47
- Location: Veenendaal, The Netherlands
Re: [Patch] Improved Build Station GUI
When will this be in de trunck
Very nice!
Re: [Patch] Improved Build Station GUI
I just have no comment on this patch. It's just great!
Re: [Patch] Improved Build Station GUI
I agree. Oh wait, that is a comment .FooBar wrote:I just have no comment on this patch. It's just great!
Re: [Patch] Improved Build Station GUI
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.
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.
Re: [Patch] Improved Build Station GUI
I concur
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
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."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
- Hamilton2007
- Transport Coordinator
- Posts: 289
- Joined: 16 Nov 2008 10:57
- Location: Belgium
Re: [Patch] Improved Build Station GUI
I don't understand exactly what you are saying, but i mean, the russian patchpack works perfect.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.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: [Patch] Improved Build Station GUI
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.Adding resizing is easy, but since window sizes aren't remembered it's pretty useless imho.
Re: [Patch] Improved Build Station GUI
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.Hamilton2007 wrote:I don't understand exactly what you are saying, but i mean, the russian patchpack works perfect.
- Hamilton2007
- Transport Coordinator
- Posts: 289
- Joined: 16 Nov 2008 10:57
- Location: Belgium
Re: [Patch] Improved Build Station GUI
Now i understand youRubidium wrote: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.Hamilton2007 wrote:I don't understand exactly what you are saying, but i mean, the russian patchpack works perfect.
I rest my case
-
- Engineer
- Posts: 6
- Joined: 31 Dec 2008 19:00
Re: [Patch] Improved Build Station GUI
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:
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:
Edit: Perhaps I should note I'm using OpenTTD r14776 with daylength, custom station GUI and custom town count patches.
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: Select all
if ( _railstation.station_class_count == 0)
Also, the help text is wrong ('waypoint' should probably be 'station') Both problems can be seen in the screenshot:
Edit: Perhaps I should note I'm using OpenTTD r14776 with daylength, custom station GUI and custom town count patches.
Re: [Patch] Improved Build Station GUI
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 (Seems to be pink/black/white for me) Is there a function out here for adding these color tags?
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)
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 (Seems to be pink/black/white for me) Is there a function out here for adding these color tags?
How did I not see that <_> That makes things quite a bit easier.[/quote]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.
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)
-
- Engineer
- Posts: 6
- Joined: 31 Dec 2008 19:00
Re: [Patch] Improved Build Station GUI
Nice, thanksscoz 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?).
Any particular reason you are using:
Code: Select all
_railstation.station_classes.erase(_railstation.station_classes.begin(), _railstation.station_classes.end());
Code: Select all
_railstation.station_classes.clear();
Who is online
Users browsing this forum: No registered users and 37 guests