From c0b8c09edcf7355ff4c24f9551886738eee9c724 Mon Sep 17 00:00:00 2001 From: Oliver 'kfsone' Smith Date: Wed, 24 Feb 2021 12:25:49 -0800 Subject: [PATCH] Added 'SetStyleColor' to make it simpler to set a color --- raygui/style.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/raygui/style.go b/raygui/style.go index f97efe1..93eb10e 100644 --- a/raygui/style.go +++ b/raygui/style.go @@ -382,6 +382,11 @@ func SetStyleProperty(guiProperty Property, value int64) { style[guiProperty] = value } +// SetStyleColor - Set one style property to a color value +func SetStyleColor(guiProperty Property, value rl.Color) { + style[guiProperty] = int64(rl.ColorToInt(value)) +} + // GetStyleProperty - Get one style property func GetStyleProperty(guiProperty Property) int64 { return style[int(guiProperty)]