Skip to content

Commit

Permalink
Merge pull request #3655 from myk002/myk_banner
Browse files Browse the repository at this point in the history
[BannerPanel] use square brackets instead of color blocks
  • Loading branch information
myk002 authored Aug 10, 2023
2 parents ca71c8c + 99517fc commit fdf878c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Template for new versions:
- Core: properly reload scripts in mods when a world is unloaded and immediately loaded again

## 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
Expand Down
8 changes: 3 additions & 5 deletions library/lua/gui/widgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1511,13 +1511,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

Expand Down

0 comments on commit fdf878c

Please sign in to comment.