From 507f09757ca751c5dc7a1e5ca7ab17ee4715e719 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 4 Jul 2025 08:46:24 -0400 Subject: use constants instead of hardcoded values --- go/ui/textBox.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/ui/textBox.go b/go/ui/textBox.go index 0e8adf5f..7f8d75ee 100644 --- a/go/ui/textBox.go +++ b/go/ui/textBox.go @@ -105,7 +105,7 @@ func NewPermInfo(x, y int, p game.Permanent) *TextBox { func (tb *TextBox) render() *ebiten.Image { var x, y float64 w, h := text.Measure(tb.text, tb.font, tb.font.Size*tb.lineSpacing) - if tb.Width == -1 || tb.Height == -1 { + if tb.Width == TEXTBOX_AUTO_DIMENSION || tb.Height == TEXTBOX_AUTO_DIMENSION { tb.Width = int(w) + 2*tb.XMargin tb.Height = int(h) + 2*tb.YMargin x = float64(tb.XMargin) -- cgit v1.2.3