Documentation ¶
Index ¶
- Constants
- func GuiButton(bounds rl.Rectangle, title string) bool
- func GuiCheckBox(bounds rl.Rectangle, title string, enabled bool) bool
- func GuiComboBox(bounds rl.Rectangle, title string, enabled int) int
- func GuiDropdownBox(bounds rl.Rectangle, title string, active *int, editMode bool) bool
- func GuiDummyRec(bounds rl.Rectangle, text string)
- func GuiGetStyle(control GuiControl, property GuiControlProperty) int
- func GuiGroupBox(bounds rl.Rectangle, title string)
- func GuiLabel(bounds rl.Rectangle, title string)
- func GuiLabelButton(bounds rl.Rectangle, title string) bool
- func GuiLine(bounds rl.Rectangle, title string)
- func GuiListView(bounds rl.Rectangle, text string, scrollIndex *int, active int) int
- func GuiListViewEx(bounds rl.Rectangle, text []string, count int, focus *int, scrollIndex *int, ...) int
- func GuiLock()
- func GuiMessageBox(bounds rl.Rectangle, title string, message string, buttons string) int
- func GuiPanel(bounds rl.Rectangle)
- func GuiProgressBar(bounds rl.Rectangle, textLeft, textRight string, ...) float32
- func GuiScrollBar(bounds rl.Rectangle, value, minValue, maxValue int) int
- func GuiScrollPanel(bounds, content rl.Rectangle, scroll *rl.Vector2) rl.Rectangle
- func GuiSetFont(font rl.Font)
- func GuiSetState(state GuiControlState)
- func GuiSetStyle(control GuiControl, property GuiControlProperty, value int)
- func GuiSlider(bounds rl.Rectangle, textLeft, textRight string, ...) float32
- func GuiSliderBar(bounds rl.Rectangle, textLeft, textRight string, ...) float32
- func GuiSpinner(bounds rl.Rectangle, title string, value *int, minValue, maxValue int, ...) bool
- func GuiStatusBar(bounds rl.Rectangle, text string)
- func GuiTextBox(bounds rl.Rectangle, text string, editMode bool) (bool, string)
- func GuiTextBoxMulti(bounds rl.Rectangle, text string, editMode bool) (bool, string)
- func GuiToggle(bounds rl.Rectangle, title string, enabled bool) bool
- func GuiToggleGroup(bounds rl.Rectangle, title string, active int) int
- func GuiUnlock()
- func GuiValueBox(bounds rl.Rectangle, title string, value *int, minValue, maxValue int, ...) bool
- func GuiWindowBox(bounds rl.Rectangle, title string) bool
- type FileDialog
- type GuiControl
- type GuiControlProperty
- type GuiControlState
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 GuiDropdownBox ¶
func GuiDummyRec ¶
func GuiGetStyle ¶
func GuiGetStyle(control GuiControl, property GuiControlProperty) int
func GuiGroupBox ¶
func GuiListView ¶
func GuiListViewEx ¶
func GuiMessageBox ¶
func GuiProgressBar ¶
func GuiScrollPanel ¶
func GuiSetFont ¶
func GuiSetState ¶
func GuiSetState(state GuiControlState)
func GuiSetStyle ¶
func GuiSetStyle(control GuiControl, property GuiControlProperty, value int)
func GuiSliderBar ¶
func GuiSpinner ¶
func GuiStatusBar ¶
func GuiTextBoxMulti ¶
func GuiValueBox ¶
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 )
Click to show internal directories.
Click to hide internal directories.