Patch: Partial refit

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

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

I like that double click idea, I'll look into it. Perhaps it makes the interface too different from the one at the depot window?

The problem I see with placing the select all button with the refit button is that it might make people think that it refers to 'select all cargos'.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Patch: Partial refit

Post by Eddi »

what about ctrl+click meaning "all vehicles from here to the end", like it does in the depot window?
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

Eddi wrote:what about ctrl+click meaning "all vehicles from here to the end", like it does in the depot window?
I like that suggestion. It is consistent, and allows to select all vehicles easily. But, does it make the 'select all' button not needed?
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Patch: Partial refit

Post by Kogut »

Terkhen wrote:
Eddi wrote:what about ctrl+click meaning "all vehicles from here to the end", like it does in the depot window?
I like that suggestion. It is consistent, and allows to select all vehicles easily. But, does it make the 'select all' button not needed?
Probably not. Button will be nice for people without knowledge about ctrl magic.
Or maybe yes and use select all as default? Like have been so far?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

By default the the whole train is selected. The Ctrl "magic" would be explained in the tooltip.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

IMHO a button is still needed.

Best place to put it would be in front or after the train.
The button should be as high as the height of the train and the scrollbar to avoid the scrollbar being partially under the button or the scrollbar could be shortened with a panel under the button.

CTRL-modifier is a nice feature but knowing about it should not be taken for granted, even when a tooltip is available. :)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

Hello Terkhen,

dkarn has found a bugsie with your patch.
I am able to reproduce it with the binary found in the first post. (h1b8dae07 at time of writing.)

When you try to refit an aircraft the game exits with a segmentation fault as soon as you press the refit button to open the refit gui.
I have not attached a crashlog as it is easy to reproduce.
Please let me know if you need it.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

New version. It corrects many bugs and issues, and adds Ctrl+Click for selecting a vehicle and the following chain.

ChillCore: Thank you for the report. This bug might be related to an issue I already fixed, because I could not reproduce it under my version. Can you check under the same conditions if the bug is still present in this new version?

Edit: After a few tests and feedback, I think that the button is not really required. There is no clear position for it in the window, and in the suggested place it might take too much space under same languages. See the following screenshot (please ignore the bugged selection):
select_all.png
select_all.png (41.67 KiB) Viewed 2024 times
Even with the smallest size posible (using 'All' is not very clear), the button is big enough to eat a lot of space.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

Terkhen wrote: ChillCore: Thank you for the report. This bug might be related to an issue I already fixed, because I could not reproduce it under my version. Can you check under the same conditions if the bug is still present in this new version?
The new version does not crash anymore when refitting an aircraft. Thank you for the quick fix.

Also it seems I lied about when it crashed before. It crashed when pressing the refit button after selecting the cargotype to refit to.
Not when opening the refit_gui. Sorry about that although it does not matter anymore.
Edit: After a few tests and feedback, I think that the button is not really required. There is no clear position for it in the window, and in the suggested place it might take too much space under same languages. See the following screenshot (please ignore the bugged selection):
About the button.
I did not think about other languages and I understand the space-eating. It does not look very good there neither to be honest.

How about an extra info line above the train image and a graphical button?

Code: Select all

eg.
Select part of train to refit   [<->]
         train image
          scrollbar
Select cargo type to carry:
Feel free to ignore if you consider the case closed ... Just thinking about the newbies that might select part of a vehicle by accident. ;)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Patch: Partial refit

Post by Alberth »

How does this look?
Attachments
select all below
select all below
select_all_bottom.png (4.1 KiB) Viewed 1981 times
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Patch: Partial refit

Post by frosch »

With bigger font sizes (like in Terkhen's screenshot) the scrollbar will look 'unusual'.
I guess to place the button in one row with the scrollbar it has to become a button with an image instead of a text.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

Alberth wrote:How does this look?
It looks better, but IMO the scrollbar should always have the same size than the widget it is handling.
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Re: Patch: Partial refit

Post by fabca2 »

my small advice (about ergonomy)
the "ALL" bouton is better placed on same line than the train (on the left)
and it could be a toggle button (toggled on when all wagon are selected)

a toggle button is like in station windows (to select cargo to display)
with such button, you can understand quickly when all train is selected or not.

the button is better on same line as train, because selecting wagon or whole train does not require the user to move the mouse to other lines (like in cargo in station windows)

in hope it makes sens for you.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

I did not feel like enabling JavaScript to get on the irc channel and prove my point.
irc wrote: 18:33:12 <@Terkhen> in fact, that button is the only thing holding the patch right now
18:33:35 < andythenorth> Terkhen: I would be very afraid of any usability advice that starts 'think about newbies'
18:33:45 < andythenorth> my experience is it's normally very wrong
Then do not take my advice ... :(

http://wiki.openttd.org/?title=GUI_Style
Mouse actions, first alinea, added by Alberth earlier this year.

Hope to see the patch in trunk soon Terkhen with or without button.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

As I commented on IRC, I don't really mind adding a button. I just want it to be included in the less intrusive way possible. The problem is that since I'm neutral to this particular feature, the best option might not be clear for me.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

I am not for ar against a button neither.

I just want my kids to be able to play OpenTTD and correct misstakes without remembering a zillion shortcuts.
That is why there are tooltips too right?


ps:
I did not mean too offend with posting the above. Sorry if I did.
I was just a bit disappointed reading that the way it was written ...
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Patch: Partial refit

Post by Zuu »

Terkhen wrote:IMO the scrollbar should always have the same size than the widget it is handling.
Indeed. Thus, I personally agree on this layout. I'm sure there are languages where "all" may have a very long word, but then, perhaps use an abbrevation and explain it more in the tooltip for those languages.

In Swedish I could translate "all" these two ways: (and possible even more if I really try to come up with other ways)
  • Alla
  • Samtliga
A good translator would take a look where this string appear and value both the language correctness of the translation and the available space.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: Partial refit

Post by Roujin »

Zuu wrote: A good translator would take a look where this string appear and value both the language correctness of the translation and the available space.
I wouldn't bet on a too high percentage of translators to be "good" by the definition you've given...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

I personally prefer the version Alberth has posted over the version with the big button.

The only thing I would change is:
- Move the button up to be on the same line as the train. (Makes it more consistent with where we click to select parts.)
- Put an empty panel underneath to keep the scrollbar the same length as the train image while not having such a big button.
- Make the button a graphic that does not need translation and does not need to resize because of choosing a bigger font. (Prevents either the scrollbar line or the train image line to resize also).
If a button with text is prefered I would go for an extra info line above the train image as then both the button and the info text can resize equally when a different fontsize is selected.

Ok, that is three things ... :)



Also after testing a bit:
- CTRL+click is not select all vehicle parts but select all vehicles following the one after the one that is CTRL+clicked it seems. I like that behaviour.
- The tooltip seems to be missing the "Click in the empty space in front or after the train to select the complete train".
- One can not rely on dragging to select the complete train as it is possible to add so many wagons to the total consist does not fit on the screen anymore.

-There is a bugsie in the gui with the selection box...
If a train is longer than the refit gui is wide and you drag until the end of the gui, then use the scrollbar to get to the end of the train. It appears that the whole train has been selected. However when you resize the gui it shows that this is not true. @See attachments.
The problem seems to be that the selection box can not be scrolled outside the gui.
To see for yourself, select the second wagon of a train that is longer than the gui and scroll to the end. the selection box goes no further than the edge of the gui.
Attachments
Kendingstone Transport, 1977-07-01.png
Kendingstone Transport, 1977-07-01.png (8.45 KiB) Viewed 1837 times
Kendingstone Transport, 1977-07-04.png
Kendingstone Transport, 1977-07-04.png (10.46 KiB) Viewed 1837 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

Thank you for the report, it was a silly mistake on my part. I have uploaded a new queue which corrects that bug and completes the tooltips.

Ctrl+Click works in the same way it does in the depot window, for consistency. Since both windows handle wagons now, the idea is to make them as similar as possible.

About the All button: I'm starting to think that an icon is probably the best option, to avoid unnecessary increased text sizes. Also, how does this affect consistency with the depot window?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Deicide, ZaphodB and 9 guests