Update/add Go functions
This commit is contained in:
parent
607adace28
commit
2013bc4628
17 changed files with 268 additions and 211 deletions
|
@ -4,7 +4,7 @@ import rl "github.com/gen2brain/raylib-go/raylib"
|
|||
|
||||
// Label - Label element, show text
|
||||
func Label(bounds rl.Rectangle, text string) {
|
||||
LabelEx(bounds, text, rl.GetColor(int32(style[LabelTextColor])), rl.NewColor(0, 0, 0, 0), rl.NewColor(0, 0, 0, 0))
|
||||
LabelEx(bounds, text, rl.GetColor(uint(style[LabelTextColor])), rl.NewColor(0, 0, 0, 0), rl.NewColor(0, 0, 0, 0))
|
||||
}
|
||||
|
||||
// LabelEx - Label element extended, configurable colors
|
||||
|
@ -12,7 +12,7 @@ func LabelEx(bounds rl.Rectangle, text string, textColor, border, inner rl.Color
|
|||
textHeight := GetStyle32(GlobalTextFontsize)
|
||||
textWidth := rl.MeasureText(text, textHeight)
|
||||
|
||||
ConstrainRectangle(&bounds, textWidth, textWidth + GetStyle32(LabelTextPadding), textHeight, textHeight + GetStyle32(LabelTextPadding) / 2)
|
||||
ConstrainRectangle(&bounds, textWidth, textWidth+GetStyle32(LabelTextPadding), textHeight, textHeight+GetStyle32(LabelTextPadding)/2)
|
||||
|
||||
// Draw control
|
||||
b := bounds.ToInt32()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue