Page 2 of 8

Re: [Patch] Improved Build Station GUI

Posted: 01 Jan 2009 10:14
by scoz
TrainTraveller wrote:

Code: Select all

Me being stupid
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)

Re: [Patch] Improved Build Station GUI

Posted: 01 Jan 2009 10:53
by yorick
I made the GUI resizeable some time ago, it's here :p

Re: [Patch] Improved Build Station GUI

Posted: 01 Jan 2009 17:30
by Expresso
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.

Re: [Patch] Improved Build Station GUI

Posted: 01 Jan 2009 18:09
by ostlandr
Nice one, TrainTraveller! That is a hack in the classic sense of the word.
TrainTraveller wrote:
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: Select all

_railstation.station_classes.erase(_railstation.station_classes.begin(), _railstation.station_classes.end());
Instead of just:

Code: Select all

_railstation.station_classes.clear();

Re: [Patch] Improved Build Station GUI

Posted: 01 Jan 2009 20:11
by andythenorth
scoz wrote:Attached pic is probably a lot better than any description I could come up with :p Changes the station gui replacing the dropdown station class with a list, and the station type list with with a preview image list
Looks great. Really helpful.

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. :P

cheers,

Andy

Re: [Patch] Improved Build Station GUI

Posted: 01 Jan 2009 23:56
by Timitry
Simply amazing, if the window will be resizable, it'll be perfect!
Thanks & good luck with trunk inclusion!

Re: [Patch] Improved Build Station GUI

Posted: 02 Jan 2009 01:41
by scoz
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.
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?

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

Posted: 02 Jan 2009 05:49
by Expresso
scoz wrote:
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.
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?
The station construction window becomes quite large with your patch, getting rid of the length/width selectors will return some valuable screen surface.

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?

Re: [Patch] Improved Build Station GUI

Posted: 02 Jan 2009 09:16
by TrainTraveller
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:
railgui_scrollbug.png
railgui_scrollbug.png (49.09 KiB) Viewed 6339 times

Re: [Patch] Improved Build Station GUI

Posted: 02 Jan 2009 09:37
by scoz
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:
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).

Re: [Patch] Improved Build Station GUI

Posted: 02 Jan 2009 09:54
by TrainTraveller
scoz wrote:Any chance you could give me a couple examples of windows that do scroll with the scroll wheel?
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, etc :-)

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,  ..
To:

Code: Select all

// improved newstations gui additions
{     WWT_MATRIX,   RESIZE_NONE,  ..
{  WWT_SCROLLBAR,   RESIZE_NONE,  ..
{ WWT_SCROLL2BAR,   RESIZE_NONE,  ..
Seems to fix the scrolling problem for the first list. However, this causes other problems (clicking on items in the list no longer has effect for example :-)). Anyway, I hope this points you in the right direction of fixing the problem :-)

Re: [Patch] Improved Build Station GUI

Posted: 02 Jan 2009 18:38
by Moriarty
CommanderZ wrote::shock: Why didn't anyone make this sooner? It is now so obvious, how user un-friendly the default station UI is...
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.

Re: [Patch] Improved Build Station GUI

Posted: 02 Jan 2009 21:58
by Teeg
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

Posted: 02 Jan 2009 22:20
by scoz
TrainTraveller wrote:
scoz wrote:Any chance you could give me a couple examples of windows that do scroll with the scroll wheel?
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, etc :-)
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. :P Anyways that fix is in for the station classes list but adding scrolling to the station buttons will wait until I make it resizeable(namely after I go about my plan to make it resizeable it will be scrollable as well). Hoping to crush the bug with only 1 station class tomorrow so hopefully tomorrow night I'll have v3 up with the bug(and stupid)squashing.

Re: [Patch] Improved Build Station GUI

Posted: 03 Jan 2009 19:02
by PhilSophus
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?
Removing the buttons completely would be very bad, unless you gave the information on valid combinations of platform count/length in a different form.

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.

Re: [Patch] Improved Build Station GUI

Posted: 05 Jan 2009 23:42
by Slye_Fox
Sorry to go offtopic, but what station grfs are those int he pics?

Re: [Patch] Improved Build Station GUI

Posted: 06 Jan 2009 00:16
by Gremnon
Industrial Stations Renewal 0.8.0

Re: [Patch] Improved Build Station GUI

Posted: 06 Jan 2009 06:55
by scoz
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

Posted: 06 Jan 2009 18:44
by Expresso
PhilSophus wrote:
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?
Removing the buttons completely would be very bad, unless you gave the information on valid combinations of platform count/length in a different form.

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.
Well, you could modify the selection area to reflect the allowed station sizes.

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.

Re: [Patch] Improved Build Station GUI

Posted: 06 Jan 2009 19:26
by CommanderZ
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?