File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,6 @@ import (
1515 rl "github.com/gen2brain/raylib-go/raylib"
1616)
1717
18- const (
19- SCROLLBAR_LEFT_SIDE = 0
20- SCROLLBAR_RIGHT_SIDE = 1
21- )
22-
2318type (
2419 ControlID uint16
2520 PropertyID uint16
@@ -32,6 +27,14 @@ func (p PropertyID) IsExtended() bool {
3227 return p >= 16
3328}
3429
30+ func (v PropertyValue ) AsColor () rl.Color {
31+ return rl.Color {uint8 (v >> 24 ), uint8 (v >> 16 ), uint8 (v >> 8 ), uint8 (v )}
32+ }
33+
34+ func NewColorPropertyValue (color rl.Color ) PropertyValue {
35+ return PropertyValue (uint32 (color .R )<< 24 + uint32 (color .G )<< 16 + uint32 (color .B )<< 8 + uint32 (color .A ))
36+ }
37+
3538// Gui control state
3639const (
3740 STATE_NORMAL PropertyValue = iota
@@ -63,6 +66,11 @@ const (
6366 TEXT_WRAP_WORD
6467)
6568
69+ const (
70+ SCROLLBAR_LEFT_SIDE PropertyValue = iota
71+ SCROLLBAR_RIGHT_SIDE
72+ )
73+
6674// Gui controls
6775const (
6876 // Default -> populates to all controls when set
@@ -79,7 +87,7 @@ const (
7987 DROPDOWNBOX
8088 TEXTBOX // Used also for: TEXTBOXMULTI
8189 VALUEBOX
82- SPINNER
90+ CONTROL11
8391 LISTVIEW
8492 COLORPICKER
8593 SCROLLBAR
You can’t perform that action at this time.
0 commit comments