I blame solar flares <_< I swore when I glanced at a std::vector page there was a clear function but when I went back to find it I couldn't ;_; Fixed on my end and it'll be in the next bug fix(which appears to pop up when you have only newgrf stations that use the default station class instead of their own)TrainTraveller wrote:Code: Select all
Me being stupid
[Patch] Improved Build Station GUI [r19159]
Moderator: OpenTTD Developers
Re: [Patch] Improved Build Station GUI
Re: [Patch] Improved Build Station GUI
I made the GUI resizeable some time ago, it's here 

Re: [Patch] Improved Build Station GUI
Could you get rid of the platform legnth en number of platforms selectors?
They could be replaced by something which shows how many platforms and at which length are legal for the currently selected platform type. imho this would make the interface more intuitive.
Another option would be to make a patch setting which allows you to select whether you'd want to use the platform length/number of platforms selectors or not.
They could be replaced by something which shows how many platforms and at which length are legal for the currently selected platform type. imho this would make the interface more intuitive.
Another option would be to make a patch setting which allows you to select whether you'd want to use the platform length/number of platforms selectors or not.
Re: [Patch] Improved Build Station GUI
Nice one, TrainTraveller! That is a hack in the classic sense of the word.
TrainTraveller wrote: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:Instead of just:Code: Select all
_railstation.station_classes.erase(_railstation.station_classes.begin(), _railstation.station_classes.end());
Code: Select all
_railstation.station_classes.clear();
Who is John Galt?
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: [Patch] Improved Build Station GUI
Looks great. Really helpful.scoz wrote:Attached pic is probably a lot better than any description I could come up withChanges the station gui replacing the dropdown station class with a list, and the station type list with with a preview image list
I was wondering if the station GUI can be made pinnable. I've just had a look and I think it might be a no, due to the way other dialogs appear/disappear when using the rail construction toolbar. Pinning would be another nice improvement, but this improved GUI is great anyway.

cheers,
Andy
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: [Patch] Improved Build Station GUI
Simply amazing, if the window will be resizable, it'll be perfect!
Thanks & good luck with trunk inclusion!
Thanks & good luck with trunk inclusion!
Re: [Patch] Improved Build Station GUI
Not exactly sure what you mean. The buttons currently get disabled if that length/platform option isn't available. Do you mean like they should disappear completely? Or remove the interface completely and have drag'n'drop only?Expresso wrote:Could you get rid of the platform legnth en number of platforms selectors?
They could be replaced by something which shows how many platforms and at which length are legal for the currently selected platform type. imho this would make the interface more intuitive.
Another option would be to make a patch setting which allows you to select whether you'd want to use the platform length/number of platforms selectors or not.
I will look at see if I can make it pinable but that might be better suited to another patch that makes all station building windows pinnable 'shrug
Re: [Patch] Improved Build Station GUI
The station construction window becomes quite large with your patch, getting rid of the length/width selectors will return some valuable screen surface.scoz wrote:Not exactly sure what you mean. The buttons currently get disabled if that length/platform option isn't available. Do you mean like they should disappear completely? Or remove the interface completely and have drag'n'drop only?Expresso wrote:Could you get rid of the platform legnth en number of platforms selectors?
They could be replaced by something which shows how many platforms and at which length are legal for the currently selected platform type. imho this would make the interface more intuitive.
Another option would be to make a patch setting which allows you to select whether you'd want to use the platform length/number of platforms selectors or not.
Also, the station construction window currently displays what cargo can be delivered to/picked up from the catchment area of the to be built station. Shouldn't that information be in a pop-up when the user is dragging the area where the station is to be built? Maybe shift could be used to get that pop-up to show up (to be consistent with the rest of the UI)?
Errr... all this sounds like a bit over the top for this patch, maybe a good idea for a follow-up?
-
- Engineer
- Posts: 6
- Joined: 31 Dec 2008 19:00
Re: [Patch] Improved Build Station GUI
I've found a bug when scrolling with a scroll wheel: you can only scroll when over the scrollbar, not when over the actual content. See the following screenshot: Scrolling in the (bright) green areas works, scrolling in the red area doesn't:
Re: [Patch] Improved Build Station GUI
Any chance you could give me a couple examples of windows that do scroll with the scroll wheel? Or did the original station do so? My laptop's trackpad does a "virtual" scroll that doesn't work in most cases so no handy way to test it personally(I'll see if I can borrow a usb mouse from a friend or something this weekend).TrainTraveller wrote:I've found a bug when scrolling with a scroll wheel: you can only scroll when over the scrollbar, not when over the actual content. See the following screenshot: Scrolling in the (bright) green areas works, scrolling in the red area doesn't:
-
- Engineer
- Posts: 6
- Joined: 31 Dec 2008 19:00
Re: [Patch] Improved Build Station GUI
As far as I know all windows that show a scrollbar allow scrolling with the mouse wheel over the content. For example, the list of towns, list of trains, list of industries, etcscoz wrote:Any chance you could give me a couple examples of windows that do scroll with the scroll wheel?

Edit: I've poked around and found the cause of the problem. Scrolling over content is only done when the next widget (widget[i+1]) is of the type WWT_SCROLLBAR of WWT_SCROLL2BAR (see DispatchMouseWheelEvent() in window.cpp). So changing:
Code: Select all
// improved newstations gui additions
{ WWT_SCROLLBAR, RESIZE_NONE, ..
{ WWT_SCROLL2BAR, RESIZE_NONE, ..
{ WWT_MATRIX, RESIZE_NONE, ..
Code: Select all
// improved newstations gui additions
{ WWT_MATRIX, RESIZE_NONE, ..
{ WWT_SCROLLBAR, RESIZE_NONE, ..
{ WWT_SCROLL2BAR, RESIZE_NONE, ..


-
- Tycoon
- Posts: 1395
- Joined: 12 Jun 2004 00:37
- Location: United Kingdom of Great Britain and Northern Ireland
- Contact:
Re: [Patch] Improved Build Station GUI
I don't mean to disparage this work, it's quite nice, however there don't appear to be any differences to the default station UI in a default game - this interface only comes into its own when you're playing with extra station GRF's.CommanderZ wrote:Why didn't anyone make this sooner? It is now so obvious, how user un-friendly the default station UI is...
Re: [Patch] Improved Build Station GUI
Considering that the default game only has one single station design, and this patch is meant to assist those who take pride in complex stations, I'd consider that a feature, not a drawback.
Re: [Patch] Improved Build Station GUI
Ha should have refreshed the thread. I go and figure it out, come back to post and say I fixed it and you've already done my work for me.TrainTraveller wrote:As far as I know all windows that show a scrollbar allow scrolling with the mouse wheel over the content. For example, the list of towns, list of trains, list of industries, etcscoz wrote:Any chance you could give me a couple examples of windows that do scroll with the scroll wheel?

-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: [Patch] Improved Build Station GUI
Removing the buttons completely would be very bad, unless you gave the information on valid combinations of platform count/length in a different form.scoz wrote:The buttons currently get disabled if that length/platform option isn't available. Do you mean like they should disappear completely? Or remove the interface completely and have drag'n'drop only?
IMHO, disappearing completely would be an alternative if the other buttons stayed at their place (i.e. [1] [disabled_2] [3] would become [1] [space] [3], but not [1] [3]), so that you still have visual feedback of allowed combinations. Since, the difference to the existing approach is small, it's probably not worth the effort.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: [Patch] Improved Build Station GUI
Sorry to go offtopic, but what station grfs are those int he pics?
Re: [Patch] Improved Build Station GUI
Industrial Stations Renewal 0.8.0
Re: [Patch] Improved Build Station GUI
Sorry I'm being so late with finishing the resizeable-ness
Moved in to the dorms and friends keep showing up and stealing me off to places. Should be finished around Friday.

Re: [Patch] Improved Build Station GUI
Well, you could modify the selection area to reflect the allowed station sizes.PhilSophus wrote:Removing the buttons completely would be very bad, unless you gave the information on valid combinations of platform count/length in a different form.scoz wrote:The buttons currently get disabled if that length/platform option isn't available. Do you mean like they should disappear completely? Or remove the interface completely and have drag'n'drop only?
IMHO, disappearing completely would be an alternative if the other buttons stayed at their place (i.e. [1] [disabled_2] [3] would become [1] [space] [3], but not [1] [3]), so that you still have visual feedback of allowed combinations. Since, the difference to the existing approach is small, it's probably not worth the effort.
For example: if a station building is only allowed to be built at a size of 1x3, the area rectangle should display only that size - no bigger size, no smaller size. If a specific platform has a minimum length/width and a maximum length/width, the area selector should become no smaller then the minimally allowed area and not bigger then the maximum allowed area. If a platform type only allows say either 2x(any size) or 4x(any size) the selection rectangle should be able to reflect that too by only resizing in hops - in this case only for the width.
If it is done in this way, you'll still have your visual feedback without losing valuable screen-space to some buttons and a more intuitive user interface too.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: [Patch] Improved Build Station GUI
Idea - what about hiding the right half of the window for the default stations (or sets with only one station) and display it only for the more advanced station sets?
Who is online
Users browsing this forum: No registered users and 5 guests