summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
Diffstat (limited to 'API.md')
-rw-r--r--API.md337
1 files changed, 210 insertions, 127 deletions
diff --git a/API.md b/API.md
index 2c0618e..f201cce 100644
--- a/API.md
+++ b/API.md
@@ -2372,7 +2372,7 @@ Radians to degrees
---
-## Globals - GuiTextAlignment
+## Globals - GuiControlTextAlignment
> TEXT_ALIGN_LEFT = 0
---
@@ -2386,6 +2386,34 @@ Radians to degrees
---
+## Globals - GuiControlTextAlignmentVertical
+> TEXT_ALIGN_TOP = 0
+
+---
+
+> TEXT_ALIGN_MIDDLE = 1
+
+---
+
+> TEXT_ALIGN_BOTTOM = 2
+
+---
+
+
+## Globals - GuiControlTextWrapMode
+> TEXT_WRAP_NONE = 0
+
+---
+
+> TEXT_WRAP_CHAR = 1
+
+---
+
+> TEXT_WRAP_WORD = 2
+
+---
+
+
## Globals - GuiControl
> DEFAULT = 0
@@ -2523,10 +2551,6 @@ Uses: BUTTON, VALUEBOX
---
-> RESERVED = 15
-
----
-
## Globals - GuiDefaultProperty
> TEXT_SIZE = 16
@@ -2553,6 +2577,24 @@ Background color
---
+> TEXT_LINE_SPACING = 20
+
+Text spacing between lines
+
+---
+
+> TEXT_ALIGNMENT_VERTICAL = 21
+
+Text vertical alignment inside text bounds (after border and padding)
+
+---
+
+> TEXT_WRAP_MODE = 22
+
+Text wrap-mode inside text bounds
+
+---
+
## Globals - GuiToggleProperty
> GROUP_PADDING = 16
@@ -2648,16 +2690,10 @@ DropdownBox items separation
---
-## Globals - GuiTextBoxProperty
-> TEXT_INNER_PADDING = 16
-
-TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
+## Globals - TextBox/TextBoxMulti/ValueBox/Spinner
+> TEXT_READONLY = 16
----
-
-> TEXT_LINES_SPACING = 17
-
-TextBoxMulti lines separation
+TextBox in read-only mode: 0-text editable, 1-text no-editable
---
@@ -8315,7 +8351,7 @@ Check if gui is locked (global state)
---
-> RL.GuiFade( float alpha )
+> RL.GuiSetAlpha( float alpha )
Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
@@ -8371,322 +8407,369 @@ Get one style property
---
-## Gui - Container/separator controls, useful for controls organization
+## Gui - Styles loading functions
---
-> state = RL.GuiWindowBox( Rectangle bounds, string title )
+> success = RL.GuiLoadStyle( string fileName )
-Window Box control, shows a window that can be closed
+Load style file over global style variable (.rgs)
-- Success return bool
+- Failure return nil
+- Success return true
---
-> RL.GuiGroupBox( Rectangle bounds, string text )
+> RL.GuiLoadStyleDefault()
+
+Load style default over global style
-Group Box control with text name
+---
+
+## Gui - Tooltips management functions
---
-> RL.GuiLine( Rectangle bounds, string text )
+> RL.GuiEnableTooltip()
-Line separator control, could contain text
+Enable gui tooltips (global state)
---
-> RL.GuiPanel( Rectangle bounds, string text )
+> RL.GuiDisableTooltip()
-Panel control, useful to group controls
+Disable gui tooltips (global state)
---
-> view, scroll = RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll )
+> RL.GuiSetTooltip( string tooltip )
-Scroll Panel control
+Set tooltip string
+
+---
-- Success return Rectangle, Vector2
+## Gui - Icons functionality
---
-## Gui - Basic controls set
+> text = RL.GuiIconText( int iconId, string text )
+
+Get text with icon id prepended (if supported)
+
+- Success return string
---
-> RL.GuiLabel( Rectangle bounds, string text )
+> RL.GuiSetIconScale( int scale )
-Label control, shows text
+Set icon scale (1 by default)
---
-> clicked = RL.GuiButton( Rectangle bounds, string text )
+> icons = RL.GuiGetIcons()
-Button control, returns true when clicked
+Get raygui icons data pointer
-- Success return boolean
+- Success return int
---
-> clicked = RL.GuiLabelButton( Rectangle bounds, string text )
+> iconNames = RL.GuiLoadIcons( string fileName, bool loadIconsName )
-Label button control, show true when clicked
+Load raygui icons file (.rgi) into internal icons data
-- Success return boolean
+- Failure return nil
+- Success return strings{}
---
-> active = RL.GuiToggle( Rectangle bounds, string text, bool active )
+> RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )
-Toggle Button control, returns true when active
+Draw icon
-- Success return boolean
+---
+
+## Gui - Container/separator controls, useful for controls organization
---
-> index = RL.GuiToggleGroup( Rectangle bounds, string text, int active )
+> result = RL.GuiWindowBox( Rectangle bounds, string title )
-Toggle Group control, returns active toggle index
+Window Box control, shows a window that can be closed
- Success return int
---
-> active = RL.GuiCheckBox( Rectangle bounds, string text, bool checked )
+> result = RL.GuiGroupBox( Rectangle bounds, string text )
-Check Box control, returns true when active
+Group Box control with text name
-- Success return boolean
+- Success return int
---
-> active = RL.GuiComboBox( Rectangle bounds, string text, int active )
+> result = RL.GuiLine( Rectangle bounds, string text )
-Combo Box control, returns selected item index
+Line separator control, could contain text
- Success return int
---
-> pressed, text = RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode )
+> result = RL.GuiPanel( Rectangle bounds, string text )
-Text Box control, updates input text
+Panel control, useful to group controls
-- Success return boolean, string
+- Success return int
---
-> pressed, text = RL.GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode )
+> result, active = RL.GuiTabBar( Rectangle bounds, string text, int active )
-Text Box control with multiple lines
+Tab Bar control, returns TAB to be closed or -1
-- Success return boolean, string
+- Success return int, int
---
-> pressed, value = RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )
+> result, scroll, view = RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll, Rectangle view )
-Spinner control, returns selected value
+Scroll Panel control
+
+- Success return int, Vector2, Rectangle
-- Success return boolean, int
+---
+
+## Gui - Basic controls set
---
-> pressed, value = RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )
+> result = RL.GuiLabel( Rectangle bounds, string text )
-Value Box control, updates input text with numbers
+Label control, shows text
-- Success return boolean, int
+- Success return int
---
-> value = RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )
+> result = RL.GuiButton( Rectangle bounds, string text )
-Slider control, returns selected value
+Button control, returns true when clicked
-- Success return float
+- Success return int
---
-> value = RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )
+> result = RL.GuiLabelButton( Rectangle bounds, string text )
-Slider Bar control, returns selected value
+Label button control, show true when clicked
-- Success return float
+- Success return int
---
-> value = RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )
+> result, active = RL.GuiToggle( Rectangle bounds, string text, bool active )
-Progress Bar control, shows current progress value
+Toggle Button control, returns true when active
-- Success return float
+- Success return int, bool
---
-> value = RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue )
+> result, active = RL.GuiToggleGroup( Rectangle bounds, string text, int active )
-Scroll Bar control
+Toggle Group control, returns active toggle index
-- Success return int
+- Success return int, int
---
-> pressed, item = RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )
+> result, active = RL.GuiToggleSlider( Rectangle bounds, string text, int active )
-Dropdown Box control, returns selected item
+Toggle Slider control, returns true when clicked
-- Success return bool, int
+- Success return int, int
---
-> RL.GuiStatusBar( Rectangle bounds, string text )
+> result, checked = RL.GuiCheckBox( Rectangle bounds, string text, bool checked )
-Status Bar control, shows info text
+Check Box control, returns true when active
+
+- Success return bool
---
-> RL.GuiDummyRec( Rectangle bounds, string text )
+> result, active = RL.GuiComboBox( Rectangle bounds, string text, int active )
-Dummy control for placeholders
+Combo Box control, returns selected item index
+
+- Success return int, int
---
-> cell = RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs )
+> result, active = RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )
-Grid control, returns mouse cell position
+Dropdown Box control, returns selected item
-- Success return Vector2
+- Success return int, int
---
-## Gui - Advance controls set
+> result, value = RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )
+
+Spinner control, returns selected value
+
+- Success return int, int
---
-> itemIndex, scrollIndex = RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active )
+> result, value = RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )
-List View control, returns selected list item index and scroll index
+Value Box control, updates input text with numbers
- Success return int, int
---
-> itemIndex, scrollIndex, focus = RL.GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active )
+> result, text = RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode )
-List View with extended parameters, returns selected list item index, scroll index and focus
+Text Box control, updates input text
-- Success return int, int, int
+- Success return int, string
---
-> buttonIndex = RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons )
+> result, value = RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )
-Message Box control, displays a message, returns button index (0 is x button)
+Slider control, returns selected value
-- Success return int
+- Success return int, float
---
-> buttonIndex, text, secretViewActive = RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive )
+> result, value = RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )
-Text Input Box control, ask for text, supports secret
+Slider Bar control, returns selected value
-- Success return int, string, int
+- Success return int, float
---
-> color = RL.GuiColorPicker( Rectangle bounds, string text, Color color )
+> result, value = RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )
-Color Picker control (multiple color controls)
+Progress Bar control, shows current progress value
-- Success return Color
+- Success return int, float
---
-> color = RL.GuiColorPanel( Rectangle bounds, string text, Color color )
+> result = RL.GuiStatusBar( Rectangle bounds, string text )
-Color Panel control
+Status Bar control, shows info text
-- Success return Color
+- Success return int
---
-> alpha = RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha )
+> result = RL.GuiDummyRec( Rectangle bounds, string text )
-Color Bar Alpha control
+Dummy control for placeholders
-- Success return float
+- Success return int
---
-> hue = RL.GuiColorBarHue( Rectangle bounds, string text, float value )
+> result, mouseCell = RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs, Vector2 mouseCell )
-Color Bar Hue control
+Grid control, returns mouse cell position
-- Success return float
+- Success return int, Vector2
---
-## Gui - Styles loading functions
+## Gui - Advance controls set
---
-> success = RL.GuiLoadStyle( string fileName )
+> result, scrollIndex, active = RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active )
-Load style file over global style variable (.rgs)
+List View control, returns selected list item index
-- Failure return false
-- Success return true
+- Success return int, int, int
---
-> RL.GuiLoadStyleDefault()
+> result, scrollIndex, active, focus = RL.GuiListViewEx( Rectangle bounds, string text, int scrollIndex, int active, int focus )
-Load style default over global style
+List View with extended parameters
+
+- Success return int, int, int, int
---
-## Gui - Icons functionality
+> result = RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons )
+
+Message Box control, displays a message
+
+- Success return int
---
-> text = RL.GuiIconText( int iconId, string text )
+> result, text, secretViewActive = RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, bool secretViewActive )
-Get text with icon id prepended (if supported)
+Text Input Box control, ask for text, supports secret
-- Success return string
+- Success return int, string, bool
---
-> RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )
+> result, color = RL.GuiColorPicker( Rectangle bounds, string text, Color color )
-Draw icon
+Color Picker control (multiple color controls)
+
+- Success return int, Color
---
-> RL.GuiSetIconScale( int scale )
+> result, color = RL.GuiColorPanel( Rectangle bounds, string text, Color color )
-Set icon scale (1 by default)
+Color Panel control
+
+- Success return int, Color
+
+---
+
+> result, alpha = RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha )
+
+Color Bar Alpha control
+
+- Success return int, float
---
-> RL.GuiSetIconPixel( int iconId, Vector2 pos )
+> result, value = RL.GuiColorBarHue( Rectangle bounds, string text, float value )
+
+Color Bar Hue control
-Set icon pixel value
+- Success return int, float
---
-> RL.GuiClearIconPixel( int iconId, Vector2 pos )
+> result, colorHsv = RL.GuiColorPickerHSV( Rectangle bounds, string text, Vector3 colorHsv )
+
+Color Picker control that avoids conversion to RGB on each call (multiple color controls)
-Clear icon pixel value
+- Success return int, Vector3
---
-> value = RL.GuiCheckIconPixel( int iconId, Vector2 pos )
+> result, colorHsv = RL.GuiColorPanelHSV( Rectangle bounds, string text, Vector3 colorHsv )
-Check icon pixel value
+Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
-- Success return bool
+- Success return int, Vector3
---