Documentation ¶
Index ¶
- type GUI
- func (gui *GUI) Begin()
- func (gui *GUI) BeginGroup(name string, height float32) bool
- func (gui *GUI) BeginWindow(name string, x, y, width, height float32) bool
- func (gui *GUI) Button(name string, isPressed *bool)
- func (gui *GUI) Checkbox(name string, ischecked *bool)
- func (gui *GUI) ColorPicker(name string, rgba *mgl32.Vec4)
- func (gui *GUI) End()
- func (gui *GUI) EndGroup()
- func (gui *GUI) EndWindow()
- func (gui *GUI) Input3(name string, vec *mgl32.Vec3, min, max, step float32)
- func (gui *GUI) Label(name string)
- func (gui *GUI) OnCursorPosMove(x, y, dx, dy float64) bool
- func (gui *GUI) OnKeyPress(key, action, mods int) bool
- func (gui *GUI) OnMouseButtonPress(leftPressed, rightPressed bool) bool
- func (gui *GUI) OnMouseScroll(x, y float64) bool
- func (gui *GUI) OnResize(width, height int) bool
- func (gui *GUI) Selector(name string, items []string, selectedIdx *int32) bool
- func (gui *GUI) Slider3(name string, vec *mgl32.Vec3, min, max, step float32)
- func (gui *GUI) SliderFloat32(name string, value *float32, min, max, step float32)
- func (gui *GUI) SliderInt32(name string, value *int32, min, max, step int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GUI ¶
type GUI struct {
// contains filtered or unexported fields
}
GUI is used for rendering a graphical user interface using the underlying rendering api used by simgl
func New ¶
New returns a pointer to the newly created GUI object. The GUI attaches itself to the specified window.
func (*GUI) Begin ¶
func (gui *GUI) Begin()
Begin marks the new frame of rendering the GUI. Make sure that the gui has at least one menu item else it will crash the program.
func (*GUI) BeginGroup ¶
BeginGroup starts a new group
func (*GUI) BeginWindow ¶
BeginWindow starts a new menu window.
func (*GUI) ColorPicker ¶
ColorPicker provides a color picker widget that returns the components of the selected RGBa color.
func (*GUI) End ¶
func (gui *GUI) End()
End renders all specified GUI objects that had been specified.
func (*GUI) OnCursorPosMove ¶
OnCursorPosMove is a callback function for a cursor move event.
func (*GUI) OnKeyPress ¶
OnKeyPress is a callback function for a key press event.
func (*GUI) OnMouseButtonPress ¶
OnMouseButtonPress is a callback function for a mouse button press event.
func (*GUI) OnMouseScroll ¶
OnMouseScroll is a callback function for a mouse scroll event.
func (*GUI) Selector ¶
Selector draws a combo box with the specified items and returns the selected item index.
func (*GUI) Slider3 ¶
Slider3 draws a slider with the specified bounds, a value step size for the resulution of the slider values and returns the current value.
func (*GUI) SliderFloat32 ¶
SliderFloat32 draws a slider with the specified bounds, a value step size for the resulution of the slider values and returns the current value.