raygui

package
Version: v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2019 License: Zlib Imports: 6 Imported by: 0

README

raygui GoDoc

raygui is simple and easy-to-use IMGUI (immediate mode GUI API) library.

screenshot

Documentation

Overview

Package raygui - Simple and easy-to-use IMGUI (immediate mode GUI API) library

Index

Constants

View Source
const (
	Disabled = iota
	Normal
	Focused
	Pressed
)

GUI controls states

Variables

This section is empty.

Functions

func BackgroundColor

func BackgroundColor() rl.Color

BackgroundColor - Get background color

func Button

func Button(bounds rl.Rectangle, text string) bool

Button - Button element, returns true when clicked

func CheckBox

func CheckBox(bounds rl.Rectangle, checked bool) bool

CheckBox - Check Box element, returns true when active

func ComboBox

func ComboBox(bounds rl.Rectangle, comboText []string, active int) int

ComboBox - Combo Box element, returns selected item index

func GetStyleProperty

func GetStyleProperty(guiProperty Property) int64

GetStyleProperty - Get one style property

func Label

func Label(bounds rl.Rectangle, text string)

Label - Label element, show text

func LabelEx

func LabelEx(bounds rl.Rectangle, text string, textColor, border, inner rl.Color)

LabelEx - Label element extended, configurable colors

func LinesColor

func LinesColor() rl.Color

LinesColor - Get lines color

func LoadGuiStyle

func LoadGuiStyle(fileName string)

LoadGuiStyle - Load GUI style file

func ProgressBar

func ProgressBar(bounds rl.Rectangle, value float32)

ProgressBar - Progress Bar element, shows current progress value

func SaveGuiStyle

func SaveGuiStyle(fileName string)

SaveGuiStyle - Save GUI style file

func SetStyleProperty

func SetStyleProperty(guiProperty Property, value int64)

SetStyleProperty - Set one style property

func Slider

func Slider(bounds rl.Rectangle, value, minValue, maxValue float32) float32

Slider - Slider element, returns selected value

func SliderBar

func SliderBar(bounds rl.Rectangle, value, minValue, maxValue float32) float32

SliderBar - Slider Bar element, returns selected value

func Spinner

func Spinner(bounds rl.Rectangle, value, minValue, maxValue int) int

Spinner - Spinner element, returns selected value

func TextBox

func TextBox(bounds rl.Rectangle, text string) string

TextBox - Text Box element, updates input text

func TextColor

func TextColor() rl.Color

TextColor - Get text color for normal state

func ToggleButton

func ToggleButton(bounds rl.Rectangle, text string, active bool) bool

ToggleButton - Toggle Button element, returns true when active

func ToggleGroup

func ToggleGroup(bounds rl.Rectangle, toggleText []string, active int) int

ToggleGroup - Toggle Group element, returns toggled button index

Types

type Property

type Property int32

Property - GUI property

const (
	GlobalBaseColor Property = iota
	GlobalBorderColor
	GlobalTextColor
	GlobalTextFontsize
	GlobalBorderWidth
	GlobalBackgroundColor
	GlobalLinesColor
	LabelBorderWidth
	LabelTextColor
	LabelTextPadding
	ButtonBorderWidth
	ButtonTextPadding
	ButtonDefaultBorderColor
	ButtonDefaultInsideColor
	ButtonDefaultTextColor
	ButtonHoverBorderColor
	ButtonHoverInsideColor
	ButtonHoverTextColor
	ButtonPressedBorderColor
	ButtonPressedInsideColor
	ButtonPressedTextColor
	ToggleTextPadding
	ToggleBorderWidth
	ToggleDefaultBorderColor
	ToggleDefaultInsideColor
	ToggleDefaultTextColor
	ToggleHoverBorderColor
	ToggleHoverInsideColor
	ToggleHoverTextColor
	TogglePressedBorderColor
	TogglePressedInsideColor
	TogglePressedTextColor
	ToggleActiveBorderColor
	ToggleActiveInsideColor
	ToggleActiveTextColor
	TogglegroupPadding
	SliderBorderWidth
	SliderButtonBorderWidth
	SliderBorderColor
	SliderInsideColor
	SliderDefaultColor
	SliderHoverColor
	SliderActiveColor
	SliderbarBorderColor
	SliderbarInsideColor
	SliderbarDefaultColor
	SliderbarHoverColor
	SliderbarActiveColor
	SliderbarZeroLineColor
	ProgressbarBorderColor
	ProgressbarInsideColor
	ProgressbarProgressColor
	ProgressbarBorderWidth
	SpinnerLabelBorderColor
	SpinnerLabelInsideColor
	SpinnerDefaultButtonBorderColor
	SpinnerDefaultButtonInsideColor
	SpinnerDefaultSymbolColor
	SpinnerDefaultTextColor
	SpinnerHoverButtonBorderColor
	SpinnerHoverButtonInsideColor
	SpinnerHoverSymbolColor
	SpinnerHoverTextColor
	SpinnerPressedButtonBorderColor
	SpinnerPressedButtonInsideColor
	SpinnerPressedSymbolColor
	SpinnerPressedTextColor
	ComboboxPadding

	ComboboxBorderWidth
	ComboboxDefaultBorderColor
	ComboboxDefaultInsideColor
	ComboboxDefaultTextColor
	ComboboxDefaultListTextColor
	ComboboxHoverBorderColor
	ComboboxHoverInsideColor
	ComboboxHoverTextColor
	ComboboxHoverListTextColor
	ComboboxPressedBorderColor
	ComboboxPressedInsideColor
	ComboboxPressedTextColor
	ComboboxPressedListBorderColor
	ComboboxPressedListInsideColor
	ComboboxPressedListTextColor
	CheckboxDefaultBorderColor
	CheckboxDefaultInsideColor
	CheckboxHoverBorderColor
	CheckboxHoverInsideColor
	CheckboxClickBorderColor
	CheckboxClickInsideColor
	CheckboxDefaultActiveColor
	CheckboxInsideWidth
	TextboxBorderWidth
	TextboxBorderColor
	TextboxInsideColor
	TextboxTextColor
	TextboxLineColor
	TextboxTextFontsize
)

GUI properties enumeration

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL