Fix Job Board text display and wrapping
- Add missing title, subtitle, right-side, issuer, body, and payout text to the container - Use a numeric wordWrap width for the detail body instead of an object
This commit is contained in:
parent
1a12fa5e1a
commit
e5e7f6ce78
|
|
@ -568,6 +568,7 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
letterSpacing: 1.5,
|
letterSpacing: 1.5,
|
||||||
})
|
})
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(title);
|
||||||
const sub = s
|
const sub = s
|
||||||
.text(
|
.text(
|
||||||
rightX + 32,
|
rightX + 32,
|
||||||
|
|
@ -576,6 +577,7 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
{ fontFamily: BODY, fontSize: '9px', color: toCss(C.faint), letterSpacing: 2 },
|
{ fontFamily: BODY, fontSize: '9px', color: toCss(C.faint), letterSpacing: 2 },
|
||||||
)
|
)
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(sub);
|
||||||
// The row's right end: the payout while open, the ledger's mark once
|
// The row's right end: the payout while open, the ledger's mark once
|
||||||
// taken (the state is read off the seams at repaint — the ledger is
|
// taken (the state is read off the seams at repaint — the ledger is
|
||||||
// the truth, the scene's refresh() lands it after each action).
|
// the truth, the scene's refresh() lands it after each action).
|
||||||
|
|
@ -609,6 +611,7 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
})
|
})
|
||||||
.setOrigin(1, 0)
|
.setOrigin(1, 0)
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(right);
|
||||||
|
|
||||||
const paint = () => {
|
const paint = () => {
|
||||||
g.clear();
|
g.clear();
|
||||||
|
|
@ -714,6 +717,7 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
letterSpacing: 2,
|
letterSpacing: 2,
|
||||||
})
|
})
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(title);
|
||||||
const issuer = s
|
const issuer = s
|
||||||
.text(rightX + 14, py + 34, `ISSUER — ${String(sel.issuer ?? '').toUpperCase()}`, {
|
.text(rightX + 14, py + 34, `ISSUER — ${String(sel.issuer ?? '').toUpperCase()}`, {
|
||||||
fontFamily: BODY,
|
fontFamily: BODY,
|
||||||
|
|
@ -722,6 +726,7 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
letterSpacing: 2,
|
letterSpacing: 2,
|
||||||
})
|
})
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(issuer);
|
||||||
// The contract's LINES (the patrol's shape — the other categories',
|
// The contract's LINES (the patrol's shape — the other categories',
|
||||||
// when they land, add their own): the DESTINATION (a patrol whose
|
// when they land, add their own): the DESTINATION (a patrol whose
|
||||||
// route stands in ANOTHER system — the posting names the target),
|
// route stands in ANOTHER system — the posting names the target),
|
||||||
|
|
@ -792,9 +797,10 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
fontSize: '10.5px',
|
fontSize: '10.5px',
|
||||||
color: toCss(C.dim),
|
color: toCss(C.dim),
|
||||||
lineSpacing: 3,
|
lineSpacing: 3,
|
||||||
wordWrap: { width: wrapW },
|
wordWrap: wrapW,
|
||||||
})
|
})
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(body);
|
||||||
const payout = s
|
const payout = s
|
||||||
.text(rightX + 14, py + ph - 46, `PAYOUT — ${sel.reward?.credits ?? 0} ${String(ui.rewardUnit ?? 'CR')}`, {
|
.text(rightX + 14, py + ph - 46, `PAYOUT — ${sel.reward?.credits ?? 0} ${String(ui.rewardUnit ?? 'CR')}`, {
|
||||||
fontFamily: BODY,
|
fontFamily: BODY,
|
||||||
|
|
@ -804,6 +810,7 @@ export class JobBoardWindow extends Phaser.GameObjects.Container {
|
||||||
letterSpacing: 2,
|
letterSpacing: 2,
|
||||||
})
|
})
|
||||||
.setScrollFactor(0);
|
.setScrollFactor(0);
|
||||||
|
this.add(payout);
|
||||||
|
|
||||||
// the ACTION door (full-width bar — the console's action shape; its
|
// the ACTION door (full-width bar — the console's action shape; its
|
||||||
// state off the ledger's seams: open → accepted → active → complete
|
// state off the ledger's seams: open → accepted → active → complete
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue