-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwidgets.go
33 lines (25 loc) · 858 Bytes
/
widgets.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package microui
func (ctx *Context) Button(label string) bool {
return ctx.ButtonEx(label, 0, MU_OPT_ALIGNCENTER) != 0
}
func (ctx *Context) TextBox(buf *string) int {
return ctx.TextBoxEx(buf, 0)
}
func (ctx *Context) Slider(value *float32, lo, hi float32) int {
return ctx.SliderEx(value, lo, hi, 0, MU_SLIDER_FMT, MU_OPT_ALIGNCENTER)
}
func (ctx *Context) Number(value *float32, step float32) int {
return ctx.NumberEx(value, step, MU_SLIDER_FMT, MU_OPT_ALIGNCENTER)
}
func (ctx *Context) Header(label string) bool {
return ctx.HeaderEx(label, 0) != 0
}
func (ctx *Context) BeginTreeNode(label string) bool {
return ctx.BeginTreeNodeEx(label, 0) != 0
}
func (ctx *Context) BeginWindow(title string, rect Rect) bool {
return ctx.BeginWindowEx(title, rect, 0) != 0
}
func (ctx *Context) BeginPanel(name string) {
ctx.BeginPanelEx(name, 0)
}