rayguigo

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 5 Imported by: 0

README

raygui-go

It's a Raygui wrapper for Golang. By the way, don't use this. It only has enough functionality for multiSav to run.

I should probably redo this with a C to Go converter.

Documentation

Index

Constants

View Source
const (
	SLIDER_WIDTH   = iota + 16 // Slider size of internal bar
	SLIDER_PADDING             // Slider/SliderBar internal bar padding
)

Slider/SliderBar

View Source
const (
	ARROWS_SIZE = iota + 16
	ARROWS_VISIBLE
	SCROLL_SLIDER_PADDING // (SLIDERBAR, SLIDER_PADDING)
	SCROLL_SLIDER_SIZE
	SCROLL_PADDING
	SCROLL_SPEED
)

ScrollBar

View Source
const (
	COMBO_BUTTON_WIDTH   = iota + 16 // ComboBox right button width
	COMBO_BUTTON_SPACING             // ComboBox button separation
)

ComboBox

View Source
const (
	ARROW_PADDING          = iota + 16 // DropdownBox arrow separation from border and items
	DROPDOWN_ITEMS_SPACING             // DropdownBox items separation
)

DropdownBox

View Source
const (
	TEXT_INNER_PADDING = iota + 16 // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
	TEXT_LINES_SPACING             // TextBoxMulti lines separation
)

TextBox/TextBoxMulti/ValueBox/Spinner

View Source
const (
	SPIN_BUTTON_WIDTH   = iota + 16 // Spinner left/right buttons width
	SPIN_BUTTON_SPACING             // Spinner buttons separation
)

Spinner

View Source
const (
	LIST_ITEMS_HEIGHT  = iota + 16 // ListView items height
	LIST_ITEMS_SPACING             // ListView items separation
	SCROLLBAR_WIDTH                // ListView scrollbar size (usually width)
	SCROLLBAR_SIDE                 // ListView scrollbar side (0-left, 1-right)
)

ListView

View Source
const (
	COLOR_SELECTOR_SIZE      = iota + 16
	HUEBAR_WIDTH             // ColorPicker right hue bar width
	HUEBAR_PADDING           // ColorPicker right hue bar separation from panel
	HUEBAR_SELECTOR_HEIGHT   // ColorPicker right hue bar selector height
	HUEBAR_SELECTOR_OVERFLOW // ColorPicker right hue bar selector overflow
)

ColorPicker

View Source
const (
	TEXT_ALIGN_LEFT = iota
	TEXT_ALIGN_CENTER
	TEXT_ALIGN_RIGHT
)
View Source
const CHECK_PADDING = 16 // CheckBox internal check padding

CheckBox

View Source
const GROUP_PADDING = 16 // ToggleGroup separation between toggles
View Source
const PROGRESS_PADDING = 16 // ProgressBar internal padding

ProgressBar

View Source
const SCROLLBAR_LEFT_SIDE = 0
View Source
const SCROLLBAR_RIGHT_SIDE = 1

Variables

This section is empty.

Functions

func GuiButton

func GuiButton(bounds rl.Rectangle, title string) bool

func GuiCheckBox

func GuiCheckBox(bounds rl.Rectangle, title string, enabled bool) bool

func GuiComboBox

func GuiComboBox(bounds rl.Rectangle, title string, enabled int) int

func GuiDropdownBox

func GuiDropdownBox(bounds rl.Rectangle, title string, active *int, editMode bool) bool

func GuiDummyRec

func GuiDummyRec(bounds rl.Rectangle, text string)

func GuiGetStyle

func GuiGetStyle(control GuiControl, property GuiControlProperty) int

func GuiGroupBox

func GuiGroupBox(bounds rl.Rectangle, title string)

func GuiLabel

func GuiLabel(bounds rl.Rectangle, title string)

func GuiLabelButton

func GuiLabelButton(bounds rl.Rectangle, title string) bool

func GuiLine

func GuiLine(bounds rl.Rectangle, title string)

func GuiListView

func GuiListView(bounds rl.Rectangle, text string, scrollIndex *int, active int) int

func GuiListViewEx

func GuiListViewEx(bounds rl.Rectangle, text []string, count int, focus *int, scrollIndex *int, active int) int

func GuiLock

func GuiLock()

func GuiMessageBox

func GuiMessageBox(bounds rl.Rectangle, title string, message string, buttons string) int

func GuiPanel

func GuiPanel(bounds rl.Rectangle)

func GuiProgressBar

func GuiProgressBar(bounds rl.Rectangle, textLeft, textRight string, value, minValue, maxValue float32) float32

func GuiScrollBar

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

func GuiScrollPanel

func GuiScrollPanel(bounds, content rl.Rectangle, scroll *rl.Vector2) rl.Rectangle

func GuiSetFont

func GuiSetFont(font rl.Font)

func GuiSetState

func GuiSetState(state GuiControlState)

func GuiSetStyle

func GuiSetStyle(control GuiControl, property GuiControlProperty, value int)

func GuiSlider

func GuiSlider(bounds rl.Rectangle, textLeft, textRight string, value, minValue, maxValue float32) float32

func GuiSliderBar

func GuiSliderBar(bounds rl.Rectangle, textLeft, textRight string, value, minValue, maxValue float32) float32

func GuiSpinner

func GuiSpinner(bounds rl.Rectangle, title string, value *int, minValue, maxValue int, editMode bool) bool

func GuiStatusBar

func GuiStatusBar(bounds rl.Rectangle, text string)

func GuiTextBox

func GuiTextBox(bounds rl.Rectangle, text string, editMode bool) (bool, string)

func GuiTextBoxMulti

func GuiTextBoxMulti(bounds rl.Rectangle, text string, editMode bool) (bool, string)

func GuiToggle

func GuiToggle(bounds rl.Rectangle, title string, enabled bool) bool

func GuiToggleGroup

func GuiToggleGroup(bounds rl.Rectangle, title string, active int) int

func GuiUnlock

func GuiUnlock()

func GuiValueBox

func GuiValueBox(bounds rl.Rectangle, title string, value *int, minValue, maxValue int, editMode bool) bool

func GuiWindowBox

func GuiWindowBox(bounds rl.Rectangle, title string) bool

Types

type FileDialog

type FileDialog struct {
	// contains filtered or unexported fields
}

func InitGuiFileDialog

func InitGuiFileDialog(width, height int, initpath string, active bool, save bool) *FileDialog

func (*FileDialog) GetResult

func (fd *FileDialog) GetResult() string

func (*FileDialog) GuiFileDialog

func (fd *FileDialog) GuiFileDialog()

func (*FileDialog) IsActive

func (fd *FileDialog) IsActive() bool

type GuiControl

type GuiControl int
const (
	// Default -> populates to all controls when set
	DEFAULT GuiControl = iota
	// Basic controls
	LABEL // Used also for: LABELBUTTON
	BUTTON
	TOGGLE // Used also for: TOGGLEGROUP
	SLIDER // Used also for: SLIDERBAR
	PROGRESSBAR
	CHECKBOX
	COMBOBOX
	DROPDOWNBOX
	TEXTBOX // Used also for: TEXTBOXMULTI
	VALUEBOX
	SPINNER // Uses: BUTTON, VALUEBOX
	LISTVIEW
	COLORPICKER
	SCROLLBAR
	STATUSBAR
)

type GuiControlProperty

type GuiControlProperty int
const (
	BORDER_COLOR_NORMAL GuiControlProperty = iota
	BASE_COLOR_NORMAL
	TEXT_COLOR_NORMAL
	BORDER_COLOR_FOCUSED
	BASE_COLOR_FOCUSED
	TEXT_COLOR_FOCUSED
	BORDER_COLOR_PRESSED
	BASE_COLOR_PRESSED
	TEXT_COLOR_PRESSED
	BORDER_COLOR_DISABLED
	BASE_COLOR_DISABLED
	TEXT_COLOR_DISABLED
	BORDER_WIDTH
	TEXT_PADDING
	TEXT_ALIGNMENT
	RESERVED
)
const (
	TEXT_SIZE        GuiControlProperty = iota + 16 // Text size (glyphs max height)
	TEXT_SPACING                                    // Text spacing between glyphs
	LINE_COLOR                                      // Line control color
	BACKGROUND_COLOR                                // Background color
)

type GuiControlState

type GuiControlState int
const (
	GUI_STATE_NORMAL GuiControlState = iota
	GUI_STATE_FOCUSED
	GUI_STATE_PRESSED
	GUI_STATE_DISABLED
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL