From 99517fcd818018b1680cb797cbb80cffbb1ae185 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 7 Aug 2023 17:20:58 -0700 Subject: [PATCH] use square brackets instead of color blocks --- docs/changelog.txt | 1 + library/lua/gui/widgets.lua | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 1f9574ea8..0ecfa52f1 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -58,6 +58,7 @@ Template for new versions: ## Fixes ## Misc Improvements +- Surround DFHack-specific UI elements with square brackets instead of red-yellow blocks for better readability - `hotkeys`: don't display DFHack logo in legends mode since it covers up important interface elements. the Ctrl-Shift-C hotkey to bring up the menu and the mouseover hotspot still function, though. ## Documentation diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index b742f6dff..b168c61a7 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -1496,13 +1496,11 @@ end BannerPanel = defclass(BannerPanel, Panel) -local BANNER_PEN = dfhack.pen.parse{fg=COLOR_YELLOW, bg=COLOR_RED} - function BannerPanel:onRenderBody(dc) - dc:pen(BANNER_PEN) + dc:pen(COLOR_RED) for y=0,self.frame_rect.height-1 do - dc:seek(0, y):char(string.char(221)) -- half-width stripe on left - dc:seek(self.frame_rect.width-1):char(string.char(222)) -- half-width stripe on right + dc:seek(0, y):char('[') + dc:seek(self.frame_rect.width-1):char(']') end end