Update raygui, silence warnings

This commit is contained in:
Milan Nikolic 2022-12-02 14:08:54 +01:00
parent 73355baab9
commit d5843a09b1
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75

View file

@ -1,7 +1,7 @@
package raygui package raygui
/* /*
#cgo CFLAGS: -DRAYGUI_IMPLEMENTATION -I../raylib/ #cgo CFLAGS: -DRAYGUI_IMPLEMENTATION -I../raylib/ -Wno-unused-result
#include "raygui.h" #include "raygui.h"
#include <stdlib.h> #include <stdlib.h>
*/ */
@ -19,230 +19,14 @@ const (
SCROLLBAR_RIGHT_SIDE = 1 SCROLLBAR_RIGHT_SIDE = 1
) )
// GuiStyleProp - transpiled function from C4GO/tests/raylib/raygui.h:332 // GuiStyleProp - Style property
//
//*
//* raygui v3.5-dev - A simple and easy-to-use immediate-mode gui library
//*
//* DESCRIPTION:
//*
//* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
//* available as a standalone library, as long as input and drawing functions are provided.
//*
//* Controls provided:
//*
//* # Container/separators Controls
//* - WindowBox --> StatusBar, Panel
//* - GroupBox --> Line
//* - Line
//* - Panel --> StatusBar
//* - ScrollPanel --> StatusBar
//*
//* # Basic Controls
//* - Label
//* - Button
//* - LabelButton --> Label
//* - Toggle
//* - ToggleGroup --> Toggle
//* - CheckBox
//* - ComboBox
//* - DropdownBox
//* - TextBox
//* - TextBoxMulti
//* - ValueBox --> TextBox
//* - Spinner --> Button, ValueBox
//* - Slider
//* - SliderBar --> Slider
//* - ProgressBar
//* - StatusBar
//* - DummyRec
//* - Grid
//*
//* # Advance Controls
//* - ListView
//* - rl.ColorPicker --> rl.ColorPanel, rl.ColorBarHue
//* - MessageBox --> Window, Label, Button
//* - TextInputBox --> Window, Label, TextBox, Button
//*
//* It also provides a set of functions for styling the controls based on its properties (size, color).
//*
//*
//* RAYGUI STYLE (guiStyle):
//*
//* raygui uses a global data array for all gui style properties (allocated on data segment by default),
//* when a new style is loaded, it is loaded over the global style... but a default gui style could always be
//* recovered with GuiLoadStyleDefault() function, that overwrites the current style to the default one
//*
//* The global style array size is fixed and depends on the number of controls and properties:
//*
//* static unsigned int guiStyle[RAYGUI_MAX_CONTROLS*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED)];
//*
//* guiStyle size is by default: 16*(16 + 8) = 384*4 = 1536 bytes = 1.5 KB
//*
//* Note that the first set of BASE properties (by default guiStyle[0..15]) belong to the generic style
//* used for all controls, when any of those base values is set, it is automatically populated to all
//* controls, so, specific control values overwriting generic style should be set after base values.
//*
//* After the first BASE set we have the EXTENDED properties (by default guiStyle[16..23]), those
//* properties are actually common to all controls and can not be overwritten individually (like BASE ones)
//* Some of those properties are: TEXT_SIZE, TEXT_SPACING, LINE_COLOR, BACKGROUND_COLOR
//*
//* Custom control properties can be defined using the EXTENDED properties for each independent control.
//*
//* TOOL: rGuiStyler is a visual tool to customize raygui style.
//*
//*
//* RAYGUI ICONS (guiIcons):
//*
//* raygui could use a global array containing icons data (allocated on data segment by default),
//* a custom icons set could be loaded over this array using GuiLoadIcons(), but loaded icons set
//* must be same RAYGUI_ICON_SIZE and no more than RAYGUI_ICON_MAX_ICONS will be loaded
//*
//* Every icon is codified in binary form, using 1 bit per pixel, so, every 16x16 icon
//* requires 8 integers (16*16/32) to be stored in memory.
//*
//* When the icon is draw, actually one quad per pixel is drawn if the bit for that pixel is set.
//*
//* The global icons array size is fixed and depends on the number of icons and size:
//*
//* static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS];
//*
//* guiIcons size is by default: 256*(16*16/32) = 2048*4 = 8192 bytes = 8 KB
//*
//* TOOL: rGuiIcons is a visual tool to customize raygui icons and create new ones.
//*
//*
//* CONFIGURATION:
//*
//* #define RAYGUI_IMPLEMENTATION
//* Generates the implementation of the library into the included file.
//* If not defined, the library is in header only mode and can be included in other headers
//* or source files without problems. But only ONE file should hold the implementation.
//*
//* #define RAYGUI_STANDALONE
//* Avoid raylib.h header inclusion in this file. Data types defined on raylib are defined
//* internally in the library and input management and drawing functions must be provided by
//* the user (check library implementation for further details).
//*
//* #define RAYGUI_NO_ICONS
//* Avoid including embedded ricons data (256 icons, 16x16 pixels, 1-bit per pixel, 2KB)
//*
//* #define RAYGUI_CUSTOM_ICONS
//* Includes custom ricons.h header defining a set of custom icons,
//* this file can be generated using rGuiIcons tool
//*
//*
//* VERSIONS HISTORY:
//* 3.5 (xx-xxx-2022) ADDED: Multiple new icons, useful for code editing tools
//* ADDED: GuiTabBar(), based on GuiToggle()
//* REMOVED: Unneeded icon editing functions
//* REDESIGNED: GuiDrawText() to divide drawing by lines
//* REMOVED: MeasureTextEx() dependency, logic directly implemented
//* REMOVED: DrawTextEx() dependency, logic directly implemented
//* ADDED: Helper functions to split text in separate lines
//* 3.2 (22-May-2022) RENAMED: Some enum values, for unification, avoiding prefixes
//* REMOVED: GuiScrollBar(), only internal
//* REDESIGNED: GuiPanel() to support text parameter
//* REDESIGNED: GuiScrollPanel() to support text parameter
//* REDESIGNED: GuiColorPicker() to support text parameter
//* REDESIGNED: GuiColorPanel() to support text parameter
//* REDESIGNED: GuiColorBarAlpha() to support text parameter
//* REDESIGNED: GuiColorBarHue() to support text parameter
//* REDESIGNED: GuiTextInputBox() to support password
//* 3.1 (12-Jan-2022) REVIEWED: Default style for consistency (aligned with rGuiLayout v2.5 tool)
//* REVIEWED: GuiLoadStyle() to support compressed font atlas image data and unload previous textures
//* REVIEWED: External icons usage logic
//* REVIEWED: GuiLine() for centered alignment when including text
//* RENAMED: Multiple controls properties definitions to prepend RAYGUI_
//* RENAMED: RICON_ references to RAYGUI_ICON_ for library consistency
//* Projects updated and multiple tweaks
//* 3.0 (04-Nov-2021) Integrated ricons data to avoid external file
//* REDESIGNED: GuiTextBoxMulti()
//* REMOVED: GuiImageButton*()
//* Multiple minor tweaks and bugs corrected
//* 2.9 (17-Mar-2021) REMOVED: Tooltip API
//* 2.8 (03-May-2020) Centralized rectangles drawing to GuiDrawRectangle()
//* 2.7 (20-Feb-2020) ADDED: Possible tooltips API
//* 2.6 (09-Sep-2019) ADDED: GuiTextInputBox()
//* REDESIGNED: GuiListView*(), GuiDropdownBox(), GuiSlider*(), GuiProgressBar(), GuiMessageBox()
//* REVIEWED: GuiTextBox(), GuiSpinner(), GuiValueBox(), GuiLoadStyle()
//* Replaced property INNER_PADDING by TEXT_PADDING, renamed some properties
//* ADDED: 8 new custom styles ready to use
//* Multiple minor tweaks and bugs corrected
//* 2.5 (28-May-2019) Implemented extended GuiTextBox(), GuiValueBox(), GuiSpinner()
//* 2.3 (29-Apr-2019) ADDED: rIcons auxiliar library and support for it, multiple controls reviewed
//* Refactor all controls drawing mechanism to use control state
//* 2.2 (05-Feb-2019) ADDED: GuiScrollBar(), GuiScrollPanel(), reviewed GuiListView(), removed Gui*Ex() controls
//* 2.1 (26-Dec-2018) REDESIGNED: GuiCheckBox(), GuiComboBox(), GuiDropdownBox(), GuiToggleGroup() > Use combined text string
//* REDESIGNED: Style system (breaking change)
//* 2.0 (08-Nov-2018) ADDED: Support controls guiLock and custom fonts
//* REVIEWED: GuiComboBox(), GuiListView()...
//* 1.9 (09-Oct-2018) REVIEWED: GuiGrid(), GuiTextBox(), GuiTextBoxMulti(), GuiValueBox()...
//* 1.8 (01-May-2018) Lot of rework and redesign to align with rGuiStyler and rGuiLayout
//* 1.5 (21-Jun-2017) Working in an improved styles system
//* 1.4 (15-Jun-2017) Rewritten all GUI functions (removed useless ones)
//* 1.3 (12-Jun-2017) Complete redesign of style system
//* 1.1 (01-Jun-2017) Complete review of the library
//* 1.0 (07-Jun-2016) Converted to header-only by Ramon Santamaria.
//* 0.9 (07-Mar-2016) Reviewed and tested by Albert Martos, Ian Eito, Sergio Martinez and Ramon Santamaria.
//* 0.8 (27-Aug-2015) Initial release. Implemented by Kevin Gato, Daniel Nicolás and Ramon Santamaria.
//*
//*
//* CONTRIBUTORS:
//*
//* Ramon Santamaria: Supervision, review, redesign, update and maintenance
//* Vlad Adrian: Complete rewrite of GuiTextBox() to support extended features (2019)
//* Sergio Martinez: Review, testing (2015) and redesign of multiple controls (2018)
//* Adria Arranz: Testing and Implementation of additional controls (2018)
//* Jordi Jorba: Testing and Implementation of additional controls (2018)
//* Albert Martos: Review and testing of the library (2015)
//* Ian Eito: Review and testing of the library (2015)
//* Kevin Gato: Initial implementation of basic components (2014)
//* Daniel Nicolas: Initial implementation of basic components (2014)
//*
//*
//* LICENSE: zlib/libpng
//*
//* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
//*
//* This software is provided "as-is", without any express or implied warranty. In no event
//* will the authors be held liable for any damages arising from the use of this software.
//*
//* Permission is granted to anyone to use this software for any purpose, including commercial
//* applications, and to alter it and redistribute it freely, subject to the following restrictions:
//*
//* 1. The origin of this software must not be misrepresented; you must not claim that you
//* wrote the original software. If you use this software in a product, an acknowledgment
//* in the product documentation would be appreciated but is not required.
//*
//* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
//* as being the original software.
//*
//* 3. This notice may not be removed or altered from any source distribution.
//*
//
// Function specifiers in case library is build/used as a shared library (Windows)
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
// Function specifiers definition
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
// Allow custom memory allocators
// Simple log system to avoid printf() calls if required
// NOTE: Avoiding those calls, also avoids const strings memory usage
//----------------------------------------------------------------------------------
// Types and Structures Definition
// NOTE: Some types are required for RAYGUI_STANDALONE usage
//----------------------------------------------------------------------------------
// Style property
type GuiStyleProp struct { type GuiStyleProp struct {
controlId uint16 controlId uint16
propertyId uint16 propertyId uint16
propertyValue uint32 propertyValue uint32
} }
// STATE_NORMAL - transpiled function from C4GO/tests/raylib/raygui.h:339 // STATE_NORMAL - Gui control state
// Gui control state
const ( const (
STATE_NORMAL int32 = 0 STATE_NORMAL int32 = 0
STATE_FOCUSED = 1 STATE_FOCUSED = 1
@ -250,22 +34,20 @@ const (
STATE_DISABLED = 3 STATE_DISABLED = 3
) )
// GuiState - transpiled function from C4GO/tests/raylib/raygui.h:339 // GuiState .
type GuiState = int32 type GuiState = int32
// TEXT_ALIGN_LEFT - transpiled function from C4GO/tests/raylib/raygui.h:347 // TEXT_ALIGN_LEFT - Gui control text alignment
// Gui control text alignment
const ( const (
TEXT_ALIGN_LEFT int32 = 0 TEXT_ALIGN_LEFT int32 = 0
TEXT_ALIGN_CENTER = 1 TEXT_ALIGN_CENTER = 1
TEXT_ALIGN_RIGHT = 2 TEXT_ALIGN_RIGHT = 2
) )
// GuiTextAlignment - transpiled function from C4GO/tests/raylib/raygui.h:347 // GuiTextAlignment .
type GuiTextAlignment = int32 type GuiTextAlignment = int32
// DEFAULT - transpiled function from C4GO/tests/raylib/raygui.h:354 // DEFAULT - Gui controls
// Gui controls
const ( const (
DEFAULT int32 = 0 DEFAULT int32 = 0
LABEL = 1 LABEL = 1
@ -285,17 +67,9 @@ const (
STATUSBAR = 15 STATUSBAR = 15
) )
// GuiControl - transpiled function from C4GO/tests/raylib/raygui.h:354 // GuiControl .
type GuiControl = int32 type GuiControl = int32
// BORDER_COLOR_NORMAL - transpiled function from C4GO/tests/raylib/raygui.h:377
// Default -> populates to all controls when set
// Basic controls
// Used also for: LABELBUTTON
// Used also for: TOGGLEGROUP
// Used also for: SLIDERBAR
// Used also for: TEXTBOXMULTI
// Uses: BUTTON, VALUEBOX
// Gui base properties for every control // Gui base properties for every control
// NOTE: RAYGUI_MAX_PROPS_BASE properties (by default 16 properties) // NOTE: RAYGUI_MAX_PROPS_BASE properties (by default 16 properties)
const ( const (
@ -317,13 +91,9 @@ const (
RESERVED = 15 RESERVED = 15
) )
// GuiControlProperty - transpiled function from C4GO/tests/raylib/raygui.h:377 // GuiControlProperty .
type GuiControlProperty = int32 type GuiControlProperty = int32
// TEXT_SIZE - transpiled function from C4GO/tests/raylib/raygui.h:402
// Gui extended properties depend on control
// NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default 8 properties)
//----------------------------------------------------------------------------------
// DEFAULT extended properties // DEFAULT extended properties
// NOTE: Those properties are common to all controls or global // NOTE: Those properties are common to all controls or global
const ( const (
@ -333,51 +103,35 @@ const (
BACKGROUND_COLOR = 19 BACKGROUND_COLOR = 19
) )
// GuiDefaultProperty - transpiled function from C4GO/tests/raylib/raygui.h:402 // GuiDefaultProperty .
type GuiDefaultProperty = int32 type GuiDefaultProperty = int32
// GROUP_PADDING - transpiled function from C4GO/tests/raylib/raygui.h:416 // GROUP_PADDING .
// Text size (glyphs max height)
// Text spacing between glyphs
// Line control color
// Background color
// Label
//typedef enum { } GuiLabelProperty;
// Button/Spinner
//typedef enum { } GuiButtonProperty;
// Toggle/ToggleGroup
const ( const (
GROUP_PADDING int32 = 16 GROUP_PADDING int32 = 16
) )
// GuiToggleProperty - transpiled function from C4GO/tests/raylib/raygui.h:416 // GuiToggleProperty .
type GuiToggleProperty = int32 type GuiToggleProperty = int32
// SLIDER_WIDTH - transpiled function from C4GO/tests/raylib/raygui.h:421
// ToggleGroup separation between toggles
// Slider/SliderBar
const ( const (
// Slider size of internal bar
SLIDER_WIDTH int32 = 16 SLIDER_WIDTH int32 = 16
// Slider/SliderBar internal bar padding
SLIDER_PADDING = 17 SLIDER_PADDING = 17
) )
// GuiSliderProperty - transpiled function from C4GO/tests/raylib/raygui.h:421 // GuiSliderProperty .
type GuiSliderProperty = int32 type GuiSliderProperty = int32
// PROGRESS_PADDING - transpiled function from C4GO/tests/raylib/raygui.h:427
// Slider size of internal bar
// Slider/SliderBar internal bar padding
// ProgressBar
const ( const (
// ProgressBar internal padding
PROGRESS_PADDING int32 = 16 PROGRESS_PADDING int32 = 16
) )
// GuiProgressBarProperty - transpiled function from C4GO/tests/raylib/raygui.h:427 // GuiProgressBarProperty .
type GuiProgressBarProperty = int32 type GuiProgressBarProperty = int32
// ARROWS_SIZE - transpiled function from C4GO/tests/raylib/raygui.h:432
// ProgressBar internal padding
// ScrollBar
const ( const (
ARROWS_SIZE int32 = 16 ARROWS_SIZE int32 = 16
ARROWS_VISIBLE = 17 ARROWS_VISIBLE = 17
@ -387,160 +141,128 @@ const (
SCROLL_SPEED = 21 SCROLL_SPEED = 21
) )
// GuiScrollBarProperty - transpiled function from C4GO/tests/raylib/raygui.h:432 // GuiScrollBarProperty .
type GuiScrollBarProperty = int32 type GuiScrollBarProperty = int32
// CHECK_PADDING - transpiled function from C4GO/tests/raylib/raygui.h:442
// (SLIDERBAR, SLIDER_PADDING)
// CheckBox
const ( const (
CHECK_PADDING int32 = 16 CHECK_PADDING int32 = 16
) )
// GuiCheckBoxProperty - transpiled function from C4GO/tests/raylib/raygui.h:442 // GuiCheckBoxProperty .
type GuiCheckBoxProperty = int32 type GuiCheckBoxProperty = int32
// COMBO_BUTTON_WIDTH - transpiled function from C4GO/tests/raylib/raygui.h:447
// CheckBox internal check padding
// ComboBox
const ( const (
// ComboBox right button width
COMBO_BUTTON_WIDTH int32 = 16 COMBO_BUTTON_WIDTH int32 = 16
// ComboBox button separation
COMBO_BUTTON_SPACING = 17 COMBO_BUTTON_SPACING = 17
) )
// GuiComboBoxProperty - transpiled function from C4GO/tests/raylib/raygui.h:447 // GuiComboBoxProperty .
type GuiComboBoxProperty = int32 type GuiComboBoxProperty = int32
// ARROW_PADDING - transpiled function from C4GO/tests/raylib/raygui.h:453
// ComboBox right button width
// ComboBox button separation
// DropdownBox
const ( const (
// DropdownBox arrow separation from border and items
ARROW_PADDING int32 = 16 ARROW_PADDING int32 = 16
// DropdownBox items separation
DROPDOWN_ITEMS_SPACING = 17 DROPDOWN_ITEMS_SPACING = 17
) )
// GuiDropdownBoxProperty - transpiled function from C4GO/tests/raylib/raygui.h:453 // GuiDropdownBoxProperty .
type GuiDropdownBoxProperty = int32 type GuiDropdownBoxProperty = int32
// TEXT_INNER_PADDING - transpiled function from C4GO/tests/raylib/raygui.h:459
// DropdownBox arrow separation from border and items
// DropdownBox items separation
// TextBox/TextBoxMulti/ValueBox/Spinner
const ( const (
// TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
TEXT_INNER_PADDING int32 = 16 TEXT_INNER_PADDING int32 = 16
// TextBoxMulti lines separation
TEXT_LINES_SPACING = 17 TEXT_LINES_SPACING = 17
) )
// GuiTextBoxProperty - transpiled function from C4GO/tests/raylib/raygui.h:459 // GuiTextBoxProperty .
type GuiTextBoxProperty = int32 type GuiTextBoxProperty = int32
// SPIN_BUTTON_WIDTH - transpiled function from C4GO/tests/raylib/raygui.h:465
// TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
// TextBoxMulti lines separation
// Spinner
const ( const (
// Spinner left/right buttons width
SPIN_BUTTON_WIDTH int32 = 16 SPIN_BUTTON_WIDTH int32 = 16
// Spinner buttons separation
SPIN_BUTTON_SPACING = 17 SPIN_BUTTON_SPACING = 17
) )
// GuiSpinnerProperty - transpiled function from C4GO/tests/raylib/raygui.h:465 // GuiSpinnerProperty .
type GuiSpinnerProperty = int32 type GuiSpinnerProperty = int32
// LIST_ITEMS_HEIGHT - transpiled function from C4GO/tests/raylib/raygui.h:471
// Spinner left/right buttons width
// Spinner buttons separation
// ListView
const ( const (
// ListView items height
LIST_ITEMS_HEIGHT int32 = 16 LIST_ITEMS_HEIGHT int32 = 16
// ListView items separation
LIST_ITEMS_SPACING = 17 LIST_ITEMS_SPACING = 17
// ListView scrollbar size (usually width)
SCROLLBAR_WIDTH = 18 SCROLLBAR_WIDTH = 18
// ListView scrollbar side (0-left, 1-right)
SCROLLBAR_SIDE = 19 SCROLLBAR_SIDE = 19
) )
// GuiListViewProperty - transpiled function from C4GO/tests/raylib/raygui.h:471 // GuiListViewProperty .
type GuiListViewProperty = int32 type GuiListViewProperty = int32
// COLOR_SELECTOR_SIZE - transpiled function from C4GO/tests/raylib/raygui.h:479
// ListView items height
// ListView items separation
// ListView scrollbar size (usually width)
// ListView scrollbar side (0-left, 1-right)
// rl.ColorPicker
const ( const (
COLOR_SELECTOR_SIZE int32 = 16 COLOR_SELECTOR_SIZE int32 = 16
// rl.ColorPicker right hue bar width
HUEBAR_WIDTH = 17 HUEBAR_WIDTH = 17
// rl.ColorPicker right hue bar separation from panel
HUEBAR_PADDING = 18 HUEBAR_PADDING = 18
// rl.ColorPicker right hue bar selector height
HUEBAR_SELECTOR_HEIGHT = 19 HUEBAR_SELECTOR_HEIGHT = 19
// rl.ColorPicker right hue bar selector overflow
HUEBAR_SELECTOR_OVERFLOW = 20 HUEBAR_SELECTOR_OVERFLOW = 20
) )
// GuiColorPickerProperty - transpiled function from C4GO/tests/raylib/raygui.h:479 // GuiColorPickerProperty .
type GuiColorPickerProperty = int32 type GuiColorPickerProperty = int32
// GuiEnable - transpiled function from C4GO/tests/raylib/raygui.h:504 // GuiEnable - Enable gui controls (global state)
// rl.ColorPicker right hue bar width
// rl.ColorPicker right hue bar separation from panel
// rl.ColorPicker right hue bar selector height
// rl.ColorPicker right hue bar selector overflow
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
// ...
//----------------------------------------------------------------------------------
// Module Functions Declaration
//----------------------------------------------------------------------------------
// Global gui state control functions
// Enable gui controls (global state)
func Enable() { func Enable() {
C.GuiEnable() C.GuiEnable()
} }
// GuiDisable - transpiled function from C4GO/tests/raylib/raygui.h:505 // GuiDisable - Disable gui controls (global state)
// Disable gui controls (global state)
func Disable() { func Disable() {
C.GuiDisable() C.GuiDisable()
} }
// GuiLock - transpiled function from C4GO/tests/raylib/raygui.h:506 // GuiLock - Lock gui controls (global state)
// Lock gui controls (global state)
func Lock() { func Lock() {
C.GuiLock() C.GuiLock()
} }
// GuiUnlock - transpiled function from C4GO/tests/raylib/raygui.h:507 // GuiUnlock - Unlock gui controls (global state)
// Unlock gui controls (global state)
func Unlock() { func Unlock() {
C.GuiUnlock() C.GuiUnlock()
} }
// GuiIsLocked - transpiled function from C4GO/tests/raylib/raygui.h:508 // GuiIsLocked - Check if gui is locked (global state)
// Check if gui is locked (global state)
func IsLocked() bool { func IsLocked() bool {
return bool(C.GuiIsLocked()) return bool(C.GuiIsLocked())
} }
// GuiFade - transpiled function from C4GO/tests/raylib/raygui.h:509 // GuiFade - Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
// Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
func Fade(alpha float32) { func Fade(alpha float32) {
calpha := C.float(alpha) calpha := C.float(alpha)
C.GuiFade(calpha) C.GuiFade(calpha)
} }
// GuiSetState - transpiled function from C4GO/tests/raylib/raygui.h:510 // GuiSetState - Set gui state (global state)
// Set gui state (global state)
func SetState(state int32) { func SetState(state int32) {
cstate := C.int(state) cstate := C.int(state)
C.GuiSetState(cstate) C.GuiSetState(cstate)
} }
// GuiGetState - transpiled function from C4GO/tests/raylib/raygui.h:511 // GuiGetState - Get gui state (global state)
// Get gui state (global state)
func GetState() int32 { func GetState() int32 {
return int32(C.GuiGetState()) return int32(C.GuiGetState())
} }
// GuiSetStyle - transpiled function from C4GO/tests/raylib/raygui.h:518 // GuiSetStyle .
func SetStyle(control int32, property int32, value int32) { func SetStyle(control int32, property int32, value int32) {
ccontrol := C.int(control) ccontrol := C.int(control)
cproperty := C.int(property) cproperty := C.int(property)
@ -548,17 +270,14 @@ func SetStyle(control int32, property int32, value int32) {
C.GuiSetStyle(ccontrol, cproperty, cvalue) C.GuiSetStyle(ccontrol, cproperty, cvalue)
} }
// GuiGetStyle - transpiled function from C4GO/tests/raylib/raygui.h:519 // GuiGetStyle - Get one style property
// Get one style property
func GetStyle(control int32, property int32) int32 { func GetStyle(control int32, property int32) int32 {
ccontrol := C.int(control) ccontrol := C.int(control)
cproperty := C.int(property) cproperty := C.int(property)
return int32(C.GuiGetStyle(ccontrol, cproperty)) return int32(C.GuiGetStyle(ccontrol, cproperty))
} }
// GuiWindowBox - transpiled function from C4GO/tests/raylib/raygui.h:522 // GuiWindowBox - Window Box control, shows a window that can be closed
// Container/separator controls, useful for controls organization
// Window Box control, shows a window that can be closed
func WindowBox(bounds rl.Rectangle, title string) bool { func WindowBox(bounds rl.Rectangle, title string) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.height = C.float(bounds.Height) cbounds.height = C.float(bounds.Height)
@ -570,8 +289,7 @@ func WindowBox(bounds rl.Rectangle, title string) bool {
return bool(C.GuiWindowBox(cbounds, ctitle)) return bool(C.GuiWindowBox(cbounds, ctitle))
} }
// GuiGroupBox - transpiled function from C4GO/tests/raylib/raygui.h:523 // GuiGroupBox - Group Box control with text name
// Group Box control with text name
func GroupBox(bounds rl.Rectangle, text string) { func GroupBox(bounds rl.Rectangle, text string) {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.height = C.float(bounds.Height) cbounds.height = C.float(bounds.Height)
@ -583,8 +301,7 @@ func GroupBox(bounds rl.Rectangle, text string) {
C.GuiGroupBox(cbounds, ctext) C.GuiGroupBox(cbounds, ctext)
} }
// GuiLine - transpiled function from C4GO/tests/raylib/raygui.h:524 // GuiLine - Line separator control, could contain text
// Line separator control, could contain text
func Line(bounds rl.Rectangle, text string) { func Line(bounds rl.Rectangle, text string) {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -596,8 +313,7 @@ func Line(bounds rl.Rectangle, text string) {
C.GuiLine(cbounds, ctext) C.GuiLine(cbounds, ctext)
} }
// GuiPanel - transpiled function from C4GO/tests/raylib/raygui.h:525 // GuiPanel - Panel control, useful to group controls
// Panel control, useful to group controls
func Panel(bounds rl.Rectangle, text string) { func Panel(bounds rl.Rectangle, text string) {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.width = C.float(bounds.Width) cbounds.width = C.float(bounds.Width)
@ -609,7 +325,7 @@ func Panel(bounds rl.Rectangle, text string) {
C.GuiPanel(cbounds, ctext) C.GuiPanel(cbounds, ctext)
} }
// Scroll Panel control // ScrollPanel control
func ScrollPanel(bounds rl.Rectangle, text string, content rl.Rectangle, scroll *rl.Vector2) rl.Rectangle { func ScrollPanel(bounds rl.Rectangle, text string, content rl.Rectangle, scroll *rl.Vector2) rl.Rectangle {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -643,7 +359,7 @@ func ScrollPanel(bounds rl.Rectangle, text string, content rl.Rectangle, scroll
return goRes return goRes
} }
// Scroll bar control (used by GuiScrollPanel()) // ScrollBar control (used by GuiScrollPanel())
func ScrollBar(bounds rl.Rectangle, value, minValue, maxValue int32) int32 { func ScrollBar(bounds rl.Rectangle, value, minValue, maxValue int32) int32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -670,7 +386,6 @@ func Label(bounds rl.Rectangle, text string) {
C.GuiLabel(cbounds, ctext) C.GuiLabel(cbounds, ctext)
} }
// GuiButton - transpiled function from C4GO/tests/raylib/raygui.h:531
// Button control, returns true when clicked // Button control, returns true when clicked
func Button(bounds rl.Rectangle, text string) bool { func Button(bounds rl.Rectangle, text string) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
@ -683,8 +398,7 @@ func Button(bounds rl.Rectangle, text string) bool {
return bool(C.GuiButton(cbounds, ctext)) return bool(C.GuiButton(cbounds, ctext))
} }
// GuiLabelButton - transpiled function from C4GO/tests/raylib/raygui.h:532 // LabelButton control, show true when clicked
// Label button control, show true when clicked
func LabelButton(bounds rl.Rectangle, text string) bool { func LabelButton(bounds rl.Rectangle, text string) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -696,7 +410,7 @@ func LabelButton(bounds rl.Rectangle, text string) bool {
return bool(C.GuiLabelButton(cbounds, ctext)) return bool(C.GuiLabelButton(cbounds, ctext))
} }
// Toggle Button control, returns true when active // Toggle control, returns true when active
func Toggle(bounds rl.Rectangle, text string, active bool) bool { func Toggle(bounds rl.Rectangle, text string, active bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -709,8 +423,7 @@ func Toggle(bounds rl.Rectangle, text string, active bool) bool {
return bool(C.GuiToggle(cbounds, ctext, cactive)) return bool(C.GuiToggle(cbounds, ctext, cactive))
} }
// GuiToggleGroup - transpiled function from C4GO/tests/raylib/raygui.h:534 // ToggleGroup control, returns active toggle index
// Toggle Group control, returns active toggle index
func ToggleGroup(bounds rl.Rectangle, text string, active int32) int32 { func ToggleGroup(bounds rl.Rectangle, text string, active int32) int32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -723,7 +436,7 @@ func ToggleGroup(bounds rl.Rectangle, text string, active int32) int32 {
return int32(C.GuiToggleGroup(cbounds, ctext, cactive)) return int32(C.GuiToggleGroup(cbounds, ctext, cactive))
} }
// Check Box control, returns true when active // CheckBox control, returns true when active
func CheckBox(bounds rl.Rectangle, text string, checked bool) bool { func CheckBox(bounds rl.Rectangle, text string, checked bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -736,8 +449,7 @@ func CheckBox(bounds rl.Rectangle, text string, checked bool) bool {
return bool(C.GuiCheckBox(cbounds, ctext, cchecked)) return bool(C.GuiCheckBox(cbounds, ctext, cchecked))
} }
// GuiComboBox - transpiled function from C4GO/tests/raylib/raygui.h:536 // ComboBox control, returns selected item index
// Combo Box control, returns selected item index
func ComboBox(bounds rl.Rectangle, text string, active int32) int32 { func ComboBox(bounds rl.Rectangle, text string, active int32) int32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -750,7 +462,6 @@ func ComboBox(bounds rl.Rectangle, text string, active int32) int32 {
return int32(C.GuiComboBox(cbounds, ctext, cactive)) return int32(C.GuiComboBox(cbounds, ctext, cactive))
} }
// GuiSlider - transpiled function from C4GO/tests/raylib/raygui.h:542
// Spinner control, returns selected value // Spinner control, returns selected value
func Spinner(bounds rl.Rectangle, text string, value *int32, minValue, maxValue int, editMode bool) bool { func Spinner(bounds rl.Rectangle, text string, value *int32, minValue, maxValue int, editMode bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
@ -776,6 +487,7 @@ func Spinner(bounds rl.Rectangle, text string, value *int32, minValue, maxValue
return bool(C.GuiSpinner(cbounds, ctext, &cvalue, cminValue, cmaxValue, ceditMode)) return bool(C.GuiSpinner(cbounds, ctext, &cvalue, cminValue, cmaxValue, ceditMode))
} }
// Slider control
func Slider(bounds rl.Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32 { func Slider(bounds rl.Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -792,8 +504,7 @@ func Slider(bounds rl.Rectangle, textLeft string, textRight string, value float3
return float32(C.GuiSlider(cbounds, ctextLeft, ctextRight, cvalue, cminValue, cmaxValue)) return float32(C.GuiSlider(cbounds, ctextLeft, ctextRight, cvalue, cminValue, cmaxValue))
} }
// GuiSliderBar - transpiled function from C4GO/tests/raylib/raygui.h:543 // SliderBar control, returns selected value
// Slider Bar control, returns selected value
func SliderBar(bounds rl.Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32 { func SliderBar(bounds rl.Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.width = C.float(bounds.Width) cbounds.width = C.float(bounds.Width)
@ -810,8 +521,7 @@ func SliderBar(bounds rl.Rectangle, textLeft string, textRight string, value flo
return float32(C.GuiSliderBar(cbounds, ctextLeft, ctextRight, cvalue, cminValue, cmaxValue)) return float32(C.GuiSliderBar(cbounds, ctextLeft, ctextRight, cvalue, cminValue, cmaxValue))
} }
// GuiProgressBar - transpiled function from C4GO/tests/raylib/raygui.h:544 // ProgressBar control, shows current progress value
// Progress Bar control, shows current progress value
func ProgressBar(bounds rl.Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32 { func ProgressBar(bounds rl.Rectangle, textLeft string, textRight string, value float32, minValue float32, maxValue float32) float32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.width = C.float(bounds.Width) cbounds.width = C.float(bounds.Width)
@ -828,8 +538,7 @@ func ProgressBar(bounds rl.Rectangle, textLeft string, textRight string, value f
return float32(C.GuiProgressBar(cbounds, ctextLeft, ctextRight, cvalue, cminValue, cmaxValue)) return float32(C.GuiProgressBar(cbounds, ctextLeft, ctextRight, cvalue, cminValue, cmaxValue))
} }
// GuiStatusBar - transpiled function from C4GO/tests/raylib/raygui.h:545 // StatusBar control, shows info text
// Status Bar control, shows info text
func StatusBar(bounds rl.Rectangle, text string) { func StatusBar(bounds rl.Rectangle, text string) {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -841,8 +550,7 @@ func StatusBar(bounds rl.Rectangle, text string) {
C.GuiStatusBar(cbounds, ctext) C.GuiStatusBar(cbounds, ctext)
} }
// GuiDummyRec - transpiled function from C4GO/tests/raylib/raygui.h:546 // DummyRec control for placeholders
// Dummy control for placeholders
func DummyRec(bounds rl.Rectangle, text string) { func DummyRec(bounds rl.Rectangle, text string) {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -854,7 +562,6 @@ func DummyRec(bounds rl.Rectangle, text string) {
C.GuiDummyRec(cbounds, ctext) C.GuiDummyRec(cbounds, ctext)
} }
// GuiGrid - transpiled function from C4GO/tests/raylib/raygui.h:547
// Grid control, returns mouse cell position // Grid control, returns mouse cell position
func Grid(bounds rl.Rectangle, text string, spacing float32, subdivs int32) rl.Vector2 { func Grid(bounds rl.Rectangle, text string, spacing float32, subdivs int32) rl.Vector2 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
@ -873,11 +580,7 @@ func Grid(bounds rl.Rectangle, text string, spacing float32, subdivs int32) rl.V
return goRes return goRes
} }
// GuiMessageBox - transpiled function from C4GO/tests/raylib/raygui.h:552 // ListView control, returns selected list item index
// Advance controls set
// List View control, returns selected list item index
// List View control
func ListView(bounds rl.Rectangle, text string, scrollIndex *int32, active int32) int32 { func ListView(bounds rl.Rectangle, text string, scrollIndex *int32, active int32) int32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -900,7 +603,7 @@ func ListView(bounds rl.Rectangle, text string, scrollIndex *int32, active int32
return int32(C.GuiListView(cbounds, ctext, &cscrollIndex, cactive)) return int32(C.GuiListView(cbounds, ctext, &cscrollIndex, cactive))
} }
// Message Box control, displays a message // MessageBox control, displays a message
func MessageBox(bounds rl.Rectangle, title string, message string, buttons string) int32 { func MessageBox(bounds rl.Rectangle, title string, message string, buttons string) int32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -916,8 +619,7 @@ func MessageBox(bounds rl.Rectangle, title string, message string, buttons strin
return int32(C.GuiMessageBox(cbounds, ctitle, cmessage, cbuttons)) return int32(C.GuiMessageBox(cbounds, ctitle, cmessage, cbuttons))
} }
// GuiColorPicker - transpiled function from C4GO/tests/raylib/raygui.h:554 // ColorPicker control (multiple color controls)
// rl.Color Picker control (multiple color controls)
func ColorPicker(bounds rl.Rectangle, text string, color rl.Color) rl.Color { func ColorPicker(bounds rl.Rectangle, text string, color rl.Color) rl.Color {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.width = C.float(bounds.Width) cbounds.width = C.float(bounds.Width)
@ -940,8 +642,7 @@ func ColorPicker(bounds rl.Rectangle, text string, color rl.Color) rl.Color {
return goRes return goRes
} }
// GuiColorPanel - transpiled function from C4GO/tests/raylib/raygui.h:555 // ColorPanel control
// Color Panel control
func ColorPanel(bounds rl.Rectangle, text string, color rl.Color) rl.Color { func ColorPanel(bounds rl.Rectangle, text string, color rl.Color) rl.Color {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -964,8 +665,7 @@ func ColorPanel(bounds rl.Rectangle, text string, color rl.Color) rl.Color {
return goRes return goRes
} }
// GuiColorBarAlpha - transpiled function from C4GO/tests/raylib/raygui.h:556 // ColorBarAlpha control
// Color Bar Alpha control
func ColorBarAlpha(bounds rl.Rectangle, text string, alpha float32) float32 { func ColorBarAlpha(bounds rl.Rectangle, text string, alpha float32) float32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.width = C.float(bounds.Width) cbounds.width = C.float(bounds.Width)
@ -978,8 +678,7 @@ func ColorBarAlpha(bounds rl.Rectangle, text string, alpha float32) float32 {
return float32(C.GuiColorBarAlpha(cbounds, ctext, calpha)) return float32(C.GuiColorBarAlpha(cbounds, ctext, calpha))
} }
// GuiColorBarHue - transpiled function from C4GO/tests/raylib/raygui.h:557 // ColorBarHue control
// Color Bar Hue control
func ColorBarHue(bounds rl.Rectangle, text string, value float32) float32 { func ColorBarHue(bounds rl.Rectangle, text string, value float32) float32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -992,8 +691,7 @@ func ColorBarHue(bounds rl.Rectangle, text string, value float32) float32 {
return float32(C.GuiColorBarHue(cbounds, ctext, cvalue)) return float32(C.GuiColorBarHue(cbounds, ctext, cvalue))
} }
// Dropdown Box control // DropdownBox control
// NOTE: Returns mouse click
func DropdownBox(bounds rl.Rectangle, text string, active *int32, editMode bool) bool { func DropdownBox(bounds rl.Rectangle, text string, active *int32, editMode bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -1016,8 +714,7 @@ func DropdownBox(bounds rl.Rectangle, text string, active *int32, editMode bool)
return bool(C.GuiDropdownBox(cbounds, ctext, &cactive, ceditMode)) return bool(C.GuiDropdownBox(cbounds, ctext, &cactive, ceditMode))
} }
// Value Box control, updates input text with numbers // ValueBox control, updates input text with numbers
// NOTE: Requires static variables: frameCounter
func ValueBox(bounds rl.Rectangle, text string, value *int32, minValue, maxValue int, editMode bool) bool { func ValueBox(bounds rl.Rectangle, text string, value *int32, minValue, maxValue int, editMode bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -1042,8 +739,7 @@ func ValueBox(bounds rl.Rectangle, text string, value *int32, minValue, maxValue
return bool(C.GuiValueBox(cbounds, ctext, &cvalue, cminValue, cmaxValue, ceditMode)) return bool(C.GuiValueBox(cbounds, ctext, &cvalue, cminValue, cmaxValue, ceditMode))
} }
// Text Box control, updates input text // TextBox control, updates input text
// NOTE 2: Returns if KEY_ENTER pressed (useful for data validation)
func TextBox(bounds rl.Rectangle, text *string, textSize int, editMode bool) bool { func TextBox(bounds rl.Rectangle, text *string, textSize int, editMode bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -1070,25 +766,19 @@ func TextBox(bounds rl.Rectangle, text *string, textSize int, editMode bool) boo
return bool(C.GuiTextBox(cbounds, ctext, ctextSize, ceditMode)) return bool(C.GuiTextBox(cbounds, ctext, ctextSize, ceditMode))
} }
// GuiLoadStyle - transpiled function from C4GO/tests/raylib/raygui.h:560 // LoadStyle file over global style variable (.rgs)
// Styles loading functions
// Load style file over global style variable (.rgs)
func LoadStyle(fileName string) { func LoadStyle(fileName string) {
cfileName := C.CString(fileName) cfileName := C.CString(fileName)
defer C.free(unsafe.Pointer(cfileName)) defer C.free(unsafe.Pointer(cfileName))
C.GuiLoadStyle(cfileName) C.GuiLoadStyle(cfileName)
} }
// TODO // LoadStyleDefault over global style
// GuiLoadStyleDefault - transpiled function from C4GO/tests/raylib/raygui.h:561
// Load style default over global style
func LoadStyleDefault() { func LoadStyleDefault() {
C.GuiLoadStyleDefault() C.GuiLoadStyleDefault()
} }
// GuiIconText - transpiled function from C4GO/tests/raylib/raygui.h:564 // IconText gets text with icon id prepended (if supported)
// Icons functionality
// Get text with icon id prepended (if supported)
func IconText(iconId int32, text string) string { func IconText(iconId int32, text string) string {
ciconId := C.int(iconId) ciconId := C.int(iconId)
ctext := C.CString(text) ctext := C.CString(text)
@ -1096,17 +786,7 @@ func IconText(iconId int32, text string) string {
return C.GoString(C.GuiIconText(ciconId, ctext)) return C.GoString(C.GuiIconText(ciconId, ctext))
} }
// TODO
// GuiGetIcons - transpiled function from C4GO/tests/raylib/raygui.h:567
// Get raygui icons data pointer
// func GetIcons() []uint32 {
// return C.GuiGetIcons()
// }
// ICON_NONE - transpiled function from C4GO/tests/raylib/raygui.h:575
//----------------------------------------------------------------------------------
// Icons enumeration // Icons enumeration
//----------------------------------------------------------------------------------
const ( const (
ICON_NONE int32 = 0 ICON_NONE int32 = 0
ICON_FOLDER_FILE_OPEN = 1 ICON_FOLDER_FILE_OPEN = 1
@ -1366,7 +1046,7 @@ const (
ICON_255 = 255 ICON_255 = 255
) )
// Text Input Box control, ask for text // TextInputBox control, ask for text
func TextInputBox(bounds rl.Rectangle, title, message, buttons string, text *string, textMaxSize int32, secretViewActive *int32) int32 { func TextInputBox(bounds rl.Rectangle, title, message, buttons string, text *string, textMaxSize int32, secretViewActive *int32) int32 {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -1409,7 +1089,7 @@ func TextInputBox(bounds rl.Rectangle, title, message, buttons string, text *str
return int32(C.GuiTextInputBox(cbounds, ctitle, cmessage, cbuttons, ctext, ctextMaxSize, &csecretViewActive)) return int32(C.GuiTextInputBox(cbounds, ctitle, cmessage, cbuttons, ctext, ctextMaxSize, &csecretViewActive))
} }
// Text Box control with multiple lines // TextBoxMulti control with multiple lines
func TextBoxMulti(bounds rl.Rectangle, text *string, textSize int32, editMode bool) bool { func TextBoxMulti(bounds rl.Rectangle, text *string, textSize int32, editMode bool) bool {
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
@ -1436,7 +1116,7 @@ func TextBoxMulti(bounds rl.Rectangle, text *string, textSize int32, editMode bo
return bool(C.GuiTextBoxMulti(cbounds, ctext, ctextSize, ceditMode)) return bool(C.GuiTextBoxMulti(cbounds, ctext, ctextSize, ceditMode))
} }
// List View control with extended parameters // ListViewEx control with extended parameters
func ListViewEx(bounds rl.Rectangle, text []string, focus, scrollIndex *int32, active int32) int32 { func ListViewEx(bounds rl.Rectangle, text []string, focus, scrollIndex *int32, active int32) int32 {
// int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active) // int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active)
@ -1472,11 +1152,8 @@ func ListViewEx(bounds rl.Rectangle, text []string, focus, scrollIndex *int32, a
return int32(C.GuiListViewEx(cbounds, (**C.char)(ctext.Pointer), count, &cfocus, &cscrollIndex, cactive)) return int32(C.GuiListViewEx(cbounds, (**C.char)(ctext.Pointer), count, &cfocus, &cscrollIndex, cactive))
} }
// Tab Bar control // TabBar control
// NOTE: Using GuiToggle() for the TABS
func TabBar(bounds rl.Rectangle, text []string, active *int32) int32 { func TabBar(bounds rl.Rectangle, text []string, active *int32) int32 {
// int GuiTabBar(Rectangle bounds, const char **text, int count, int *active)
var cbounds C.struct_Rectangle var cbounds C.struct_Rectangle
cbounds.x = C.float(bounds.X) cbounds.x = C.float(bounds.X)
cbounds.y = C.float(bounds.Y) cbounds.y = C.float(bounds.Y)
@ -1497,13 +1174,3 @@ func TabBar(bounds rl.Rectangle, text []string, active *int32) int32 {
}() }()
return int32(C.GuiTabBar(cbounds, (**C.char)(ctext.Pointer), count, &cactive)) return int32(C.GuiTabBar(cbounds, (**C.char)(ctext.Pointer), count, &cactive))
} }
// Warning (*ast.FunctionDecl): {prefix: n:SetAudioStreamCallback,t1:void (AudioStream, AudioCallback),t2:}. C4GO/tests/raylib/raylib.h:1567 :cannot transpileFunctionDecl. cannot bindingFunctionDecl func `SetAudioStreamCallback`. field type is pointer: `rAudioBuffer *`
// Warning (*ast.FunctionDecl): {prefix: n:AttachAudioStreamProcessor,t1:void (AudioStream, AudioCallback),t2:}. C4GO/tests/raylib/raylib.h:1569 :cannot transpileFunctionDecl. cannot bindingFunctionDecl func `AttachAudioStreamProcessor`. field type is pointer: `rAudioBuffer *`
// Warning (*ast.FunctionDecl): {prefix: n:DetachAudioStreamProcessor,t1:void (AudioStream, AudioCallback),t2:}. C4GO/tests/raylib/raylib.h:1570 :cannot transpileFunctionDecl. cannot bindingFunctionDecl func `DetachAudioStreamProcessor`. field type is pointer: `rAudioBuffer *`
// Warning (*ast.FunctionDecl): {prefix: n:GuiSetFont,t1:void (Font),t2:}. C4GO/tests/raylib/raygui.h:514 :cannot transpileFunctionDecl. cannot bindingFunctionDecl func `GuiSetFont`. field type is pointer: `Rectangle *`
// Warning (*ast.FunctionDecl): {prefix: n:GuiGetFont,t1:Font (void),t2:}. C4GO/tests/raylib/raygui.h:515 :cannot transpileFunctionDecl. cannot bindingFunctionDecl func `GuiGetFont`. field type is pointer: `Rectangle *`