diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-04 08:46:24 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:22 +0200 |
| commit | 507f09757ca751c5dc7a1e5ca7ab17ee4715e719 (patch) | |
| tree | 08e7e988c4357a43a96c36aea70a7c5cbae04aa6 | |
| parent | 9e3e8952f77fbd6b35c4cb0c5c1bf9cc26f9e35a (diff) | |
| download | muhqs-game-507f09757ca751c5dc7a1e5ca7ab17ee4715e719.tar.gz muhqs-game-507f09757ca751c5dc7a1e5ca7ab17ee4715e719.zip | |
use constants instead of hardcoded values
| -rw-r--r-- | go/ui/textBox.go | 2 |
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) |
