aboutsummaryrefslogtreecommitdiff
path: root/go/ui
diff options
context:
space:
mode:
Diffstat (limited to 'go/ui')
-rw-r--r--go/ui/textBox.go2
1 files changed, 1 insertions, 1 deletions
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)