Page 1 of 1
Columns in missionText
Posted: Sun Jan 04, 2015 11:30 pm
by phkb
Is it possible to format the missionText of a mission screen into columns, using (for instance) tab characters? I know I can insert spaces, but missionText is proportionally spaced, isn't it? So using spaces would result in ragged columns.
Re: Columns in missionText
Posted: Mon Jan 05, 2015 7:18 am
by cim
Tabs don't work (yet -
it's been requested) but the
String.fromCharCode(31)
character is an extremely narrow space which can be used (together with normal spaces) for alignment.
This is how the columns on the contract offer screens are lined up. The _paddingText function in
oolite-contracts-helpers.js does most of the work, and you could use that from your own scripts.
Re: Columns in missionText
Posted: Mon Jan 05, 2015 10:14 am
by phkb
Thanks, cim. Wonderful help, as usual!