aboutsummaryrefslogtreecommitdiff
path: root/vendor/raylib
diff options
context:
space:
mode:
authorJason Olson <jolson88@outlook.com>2024-08-17 12:35:50 -0700
committerJason Olson <jolson88@outlook.com>2024-08-17 12:35:50 -0700
commitacfd9dcd1b6abb6ed7545a75804ec13768a4c520 (patch)
treec10d3d4f8421e083e5aa524f7e963ba153a099b3 /vendor/raylib
parent9553bc3689583158d044c82a3fd75248114f2291 (diff)
Restores vertical text alignment broken after 4.0 migration
A series of changes between raygui 3.6 and 4.0 were that various text box properties were moved from the text box specific properties up into the extended default control properties. This change corrects the various property enums to match the raygui 4.0 API. One additional aspect of this change was rolling back a previous commit made to this vendor file that changed the signature of GuiSetStyle and GuiGetStyle from using a c.int as property value to a more strongly-defined GuiControlProperty enum. Unfortunately, this breaks the raygui API by disallowing the use of various control-specific extended properties due to how the enums are built.
Diffstat (limited to 'vendor/raylib')
-rw-r--r--vendor/raylib/raygui.odin12
1 files changed, 5 insertions, 7 deletions
diff --git a/vendor/raylib/raygui.odin b/vendor/raylib/raygui.odin
index bcbb364da..fd3080d48 100644
--- a/vendor/raylib/raygui.odin
+++ b/vendor/raylib/raygui.odin
@@ -110,6 +110,8 @@ GuiDefaultProperty :: enum c.int {
LINE_COLOR, // Line control color
BACKGROUND_COLOR, // Background color
TEXT_LINE_SPACING, // Text spacing between lines
+ TEXT_ALIGNMENT_VERTICAL, // Text vertical alignment inside text bounds (after border and padding)
+ TEXT_WRAP_MODE // Text wrap-mode inside text bounds
}
// Label
@@ -163,11 +165,7 @@ GuiDropdownBoxProperty :: enum c.int {
// TextBox/TextBoxMulti/ValueBox/Spinner
GuiTextBoxProperty :: enum c.int {
- TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
- TEXT_LINES_SPACING, // TextBoxMulti lines separation
- TEXT_ALIGNMENT_VERTICAL, // TextBoxMulti vertical alignment: 0-CENTERED, 1-UP, 2-DOWN
- TEXT_MULTILINE, // TextBox supports multiple lines
- TEXT_WRAP_MODE, // TextBox wrap mode for multiline: 0-NO_WRAP, 1-CHAR_WRAP, 2-WORD_WRAP
+ TEXT_READONLY = 16, // TextBox in read-only mode: 0-text editable, 1-text no-editable
}
// Spinner
@@ -229,8 +227,8 @@ foreign lib {
// Style set/get functions
- GuiSetStyle :: proc(control: GuiControl, property: GuiControlProperty, value: c.int) --- // Set one style property
- GuiGetStyle :: proc(control: GuiControl, property: GuiControlProperty) -> c.int --- // Get one style property
+ GuiSetStyle :: proc(control: GuiControl, property: c.int, value: c.int) --- // Set one style property
+ GuiGetStyle :: proc(control: GuiControl, property: c.int) -> c.int --- // Get one style property
// Styles loading functions