Columns in missionText
Moderators: winston, another_commander
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Columns in missionText
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
Tabs don't work (yet - it's been requested) but the
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.
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.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Columns in missionText
Thanks, cim. Wonderful help, as usual!