too wide sprites in purchase list
Looking at http://hg.openttd.org/openttd/trunk.hg/rev/33d14671534c which is a follow-up to http://dev.openttdcoop.org/issues/1128 it should probably be considered to shorten the sprites in the purchase view as it will start to glitch as soon as people assign custom names to vehicle types.
Maybe smaller-scale versions and / or with the flag in the background can be provided instead of the current situation.
#1 Updated by planetmaker almost 3 years ago
- File Great_Prenhattan_Transport__18-01-1950.png added
- File Great_Prenhattan_Transport__31-03-1950.png added
Attached two screenshots which show for a few wagons and engines the effect
#3 Updated by Ammler almost 3 years ago
or just note in the Readme, that renaming can cause glitches...
#4 Updated by Rubidium almost 3 years ago
No, that breaks (similarly) with right-to-left languages.
Even then, for left-to-right languages, if the use removes the spaces the same issue exists.
#5 Updated by planetmaker almost 3 years ago
Point is: we probably have to cater for an arbitrary custom string and cannot really assume that custom user-provided strings follow our design-rules.
#6 Updated by DJNekkid almost 3 years ago
Then I vote for a new action0 property, or a var2 callback, "cannot rename vehicle" :)
And tbh, imho, if people start to rename the vehicles i think that is their problem, and not ours. We provide a (hopefully) good set that people use, and imho is the flag and the power-icon one of the trademarks of the 2cc-set.
By default is the purchase window 60 px (or 61 if we dont count 1px separation between gfx and text). Flag + icon is 32px currently, but can probably shave of 1px (currently 2px separation between icon and flag).
1 px between text and icon
1 px between icon and flag
1 px between flag and train
61-34 = 27 px for the train.
There is currently 53px used for the train. (total 94px from left border to the text).
#7 Updated by DJNekkid almost 3 years ago
This goes more to people like alberth and rubidum;
what about (if I/we provide sprites) a "stringcode" for the flag and the "icon"? That way we go around the problem, and the nice gfx bits are still applied :)
#8 Updated by Rubidium almost 3 years ago
In OpenTTD string codes are resolved to plain text and that text is resolved to characters in a font, which are then drawn. Those characters are basically black/white, but can be recoloured. In no case would you get properly coloured flags using this method.
As such the use of string codes to solve your problem the proposed way is a bigger hack than using the SETX string code.