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

Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Patch: Partial refit

Post by Kogut »

All may be long in other languages - for example "wszystkie".
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
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: I have uploaded a new queue which corrects that bug and completes the tooltips.
I would not mind testing futher/again, can you please re-post the link to your patch space?
I do not see it anymore in the first post and the versions there seem to be the previous still.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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 »

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

Re: Patch: Partial refit

Post by ChillCore »

Thank you for the link. It was a bit hard to check without the pacth. :)

The selection box thinghy is fixed indeed.
How changing the order of two lines can make such a big difference ...

If i spot something else I'll post it , untill now everything seems to be working correctly. (Only tested trains for the moment)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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 »

The patch has now been committed to trunk and will appear in today's nightly. The only thing missing now is the select all button :D

Here is my current implementation of the button. What do you think?
select_all.png
select_all.png (89.49 KiB) Viewed 2015 times
You can find the patch queue (of course, now it only includes the new panel and the button) at the usual place.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Patch: Partial refit

Post by Zephyris »

Looks good I think...
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Patch: Partial refit

Post by Arie- »

A bit late I guess, but I just thought of it now, a suggestion for the "select total train button": a check box. The looks (image) of the button depends on the state, three possible:
- empty box when no component is selected.
- a box with a greyed x when at least one is selected, but not all.
- a box with a black x when all train parts are selected.
When the button is clicked, the selected parts are set to none or all. Which of the two is chosen when at least one, but not all are selected, is up to the developer.
I've read through the topic, and have seen an image was considered, but have not found why it was discarded as a solution. A quick mock-up is attached, but I think you all know the concept of such a box.
v_mockup.PNG
v_mockup.PNG (696 Bytes) Viewed 1944 times
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

You are not late. The rest of the patch has been commited, but the button issue is still open for discussion. The idea of an icon is not discarded; I coded the text version because it is a quite simple patch.

We need the answer to two questions. Where should the button be placed? Should it use an icon or text?
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Patch: Partial refit

Post by WWTBAM »

I do like the idea of an icon. I think an icon in the style of Pikka's UKRS2 Multiheaded Engine Purchase List icons wold be suitable.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
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 »

Maybe an icon with a train consisting of one engine and one (or two wagons) and the whole train marked as selected? It would have to be maybe about 30-40 pixles long.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Patch: Partial refit

Post by Arie- »

Something like this?
something_like_this.PNG
something_like_this.PNG (797 Bytes) Viewed 1907 times
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: The patch has now been committed to trunk and will appear in today's nightly. The only thing missing now is the select all button :D

Here is my current implementation of the button. What do you think?
Congrats on trunk inclusion. :)


I think it is OK the way you have implemented the button and the info line.
It looks like the buttons in the company's stations gui, the ones to enable all cargos or all vehicle types, and therefore pretty consistent with the other guis.

About addding a graphical button ...
Can the button remain there if a bigger fonsize is selected? Would that not give problems?
Maybe it would be better to make a sprite that has no "button" shape but is drawn centered in the panel? Like how it is done for vehicle sprites in the guis.
That way if the line gets higher in height the sprite is always drawn in the correct place and the result is not a small button with an extra (little) panel above or below ?
Just an idea ... ;)

Will check out the remaining patch(es) in a bit ...
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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 »

I once looked into changing painting of images on buttons so that they are vertically aligned in the middle, but never came around to finalize it. However IIRC it was fairly straight forward to get it working but it might be that there was some pit falls that must be handled as well.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Patch: Partial refit

Post by ChillCore »

For text is was WWT_LABEL IIRC.
I do not know if someting like that exists for images or if text can simply be replaced by an image and then put on a button.
It would be cool though. :)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
555gln22
Engineer
Engineer
Posts: 120
Joined: 09 Sep 2008 19:48

Re: Patch: Partial refit

Post by 555gln22 »

What about a Ctrl-Click option? Might work?
Formerly known as 'davepoth'
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 »

I personally find it a bit strange that when I have made a selection and then click on the refit button, my specific selection is cleared and the whole train gets selected. I think my selection should remain when I click on the refit-button. Otherwise it looks like the refit fails.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

davepoth wrote:What about a Ctrl-Click option? Might work?
The Ctrl+Click option is already included. The button is meant for adding a more visible option to select all vehicles.
Zuu wrote:I personally find it a bit strange that when I have made a selection and then click on the refit button, my specific selection is cleared and the whole train gets selected. I think my selection should remain when I click on the refit-button. Otherwise it looks like the refit fails.
In most train sets, the selected part will change its graphics to fit the new refitted cargo. IMO it makes sense to change the selection, since it is not very probable that you will want to refit the same part of the train twice.
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 »

I would counter and say that if you have refitted a subset of all wagons, it is not likely that you want refit them again, therefore a complete selection of the train is not more useful than keeping the subset selection.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Partial refit

Post by Terkhen »

That's true, but I still think that changing the selection is a clear way of showing the user that something happened.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Patch: Partial refit

Post by Zephyris »

Could the cargo icon for the current refit be displayed under each wagon? That would make it clearer when a wagon has been refitted too...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 33 guests