This commit is contained in:
Milan Nikolic 2021-11-11 17:03:15 +01:00
parent 3e1b83e017
commit dda13779be
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
16 changed files with 17 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package raygui
import (
"fmt"
"github.com/gen2brain/raylib-go/raylib"
)
@ -38,7 +39,7 @@ func ComboBox(bounds rl.Rectangle, comboText []string, active int) int {
textWidth := rl.MeasureText(activeText, textHeight)
// Ensure box is large enough.
ConstrainRectangle(&bounds, textWidth, textWidth + GetStyle32(ToggleTextPadding), textHeight, textHeight + GetStyle32(ToggleTextPadding))
ConstrainRectangle(&bounds, textWidth, textWidth+GetStyle32(ToggleTextPadding), textHeight, textHeight+GetStyle32(ToggleTextPadding))
b := bounds.ToInt32()
// Generate the worst-case sizing of the counter so we can avoid resizing it as the numbers go up/down.