From a91c367322d5d5d15a78a8288bf66259709357f0 Mon Sep 17 00:00:00 2001 From: echicken <echicken@bbs.electronicchicken.com> Date: Sat, 19 Feb 2022 06:33:13 +0000 Subject: [PATCH] Added titleBackground config setting. (For CG Learn) Removed attribution rather than fix its coloring. Nobody cares, and if you do care, have you tried not caring? It's easy, it's just a matter of doing nothing. Bullshit is a proud sponsor of funclib.js. --- xtrn/bullshit/bullshit-lib.js | 2 ++ xtrn/bullshit/bullshit.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xtrn/bullshit/bullshit-lib.js b/xtrn/bullshit/bullshit-lib.js index 1013790d36..913c7f9ed8 100644 --- a/xtrn/bullshit/bullshit-lib.js +++ b/xtrn/bullshit/bullshit-lib.js @@ -22,6 +22,8 @@ function loadSettings(path) { } }); + if (settings.colors.titleBackground === undefined) settings.colors.titleBackground = BG_BLACK; + return settings; } diff --git a/xtrn/bullshit/bullshit.js b/xtrn/bullshit/bullshit.js index 9fc597358c..268bd318ac 100644 --- a/xtrn/bullshit/bullshit.js +++ b/xtrn/bullshit/bullshit.js @@ -216,7 +216,7 @@ function initDisplay(settings, list) { const frame = new Frame(1, 1, console.screen_columns, console.screen_rows, WHITE); - const titleFrame = new Frame(frame.x, frame.y, frame.width, 3, WHITE, frame); + const titleFrame = new Frame(frame.x, frame.y, frame.width, 3, settings.colors.title|settings.colors.titleBackground, frame); const footerFrame = new Frame(frame.x, frame.y + frame.height - 3, frame.width, 3, WHITE, frame); const treeFrame = new Frame(frame.x, titleFrame.y + titleFrame.height, frame.width, frame.height - titleFrame.height - footerFrame.height, WHITE, frame); const treeSubFrame = new Frame(treeFrame.x + 1, treeFrame.y + 2, treeFrame.width - 2, treeFrame.height - 3, WHITE, treeFrame); @@ -226,9 +226,9 @@ function initDisplay(settings, list) { footerFrame.drawBorder(settings.colors.border); titleFrame.gotoxy(3, 2); - titleFrame.putmsg('Bulletins', settings.colors.title); - titleFrame.gotoxy(frame.width - 25, 2); - titleFrame.putmsg('bullshit v3 by echicken', settings.colors.heading); + titleFrame.putmsg('Bulletins'); + // titleFrame.gotoxy(frame.width - 25, 2); + // titleFrame.putmsg('bullshit v3 by echicken', settings.colors.heading); treeFrame.gotoxy(3, 2); treeFrame.putmsg('Title', settings.colors.heading); -- GitLab