From 565c984e563be3bc37c9ab5674ee088f2ea718c0 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 28 May 2019 21:40:56 -0300 Subject: Easter egg??? :) --- ui.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 3d2bbee..e1eb528 100644 --- a/ui.js +++ b/ui.js @@ -2763,6 +2763,8 @@ class Menubar extends ListScrollForm { super('horizontal') this.contextMenu = contextMenu + this.color = 4 // blue + this.attribute = 2 // dim } select() { @@ -2791,6 +2793,16 @@ class Menubar extends ListScrollForm { if (telc.isSpace(keyBuf)) { return false } + + // For fun :) + if (telc.isCaselessLetter(keyBuf, 'c')) { + this.color = (this.color % 8) + 1 + return false + } + if (telc.isCaselessLetter(keyBuf, 'a')) { + this.attribute = (this.attribute % 3) + 1 + return false + } } restoreSelection() { @@ -2832,7 +2844,7 @@ class Menubar extends ListScrollForm { drawTo(writable) { writable.write(ansi.moveCursor(this.absTop, this.absLeft)) - writable.write(ansi.setAttributes([ansi.C_BLUE, ansi.A_DIM, ansi.A_INVERT, ansi.C_WHITE + 10])) + writable.write(ansi.setAttributes([this.attribute, 30 + this.color, ansi.A_INVERT, ansi.C_WHITE + 10])) writable.write(' '.repeat(this.w)) writable.write(ansi.resetAttributes()) } -- cgit 1.3.0-6-gf8a5