tCenter frame according to size - scoreboard - Interactive scoreboard for CTF-like games
HTML git clone git://git.z3bra.org/scoreboard.git
DIR Log
DIR Files
DIR Refs
---
DIR commit f8c4e2ae95d556e1a70df893aade24a9662bd553
DIR parent d731e1d8e09cb35c7942e9b775bc137749fa4ace
HTML Author: Willy Goiffon <contact@z3bra.org>
Date: Tue, 22 Aug 2023 07:58:21 +0200
Center frame according to size
Diffstat:
M main.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/main.go b/main.go
t@@ -120,7 +120,8 @@ func pageBoard() tview.Primitive {
cyboard.SetupFrame()
cyboard.DrawBoard()
- return center(28, 19, cyboard.frame)
+ // center frame on screen, counting borders + header
+ return center(BOARD_WIDTH + 2, BOARD_HEIGHT + 4, cyboard.frame)
}
func main() {