Skip to content

Commit 65cf0a8

Browse files
committed
update to main branch
1 parent 4b50ad2 commit 65cf0a8

24 files changed

+725
-1186
lines changed

examples/gui/controls_test_suite/controls_test_suite.lpr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103

104104
ExResult, BoxResult: integer;
105105

106+
107+
106108
begin
107109
// Initialization
108110
//--------------------------------------------------------------------------------------

gui/styles/amber/style_amber.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// more info and bugs-report: github.com/raysan5/raygui //
88
// feedback and support: ray[at]raylibtech.com //
99
// //
10-
// Copyright (c) 2020-2024 raylib technologies (@raylibtech) //
10+
// Copyright (c) 2020-2025 raylib technologies (@raylibtech) //
1111
// //
1212
//////////////////////////////////////////////////////////////////////////////////
1313

@@ -23,19 +23,19 @@ static const GuiStyleProp amberStyleProps[AMBER_STYLE_PROPS_COUNT] = {
2323
{ 0, 5, (int)0xffffffff }, // DEFAULT_TEXT_COLOR_FOCUSED
2424
{ 0, 6, (int)0xf1cf9dff }, // DEFAULT_BORDER_COLOR_PRESSED
2525
{ 0, 7, (int)0xf39333ff }, // DEFAULT_BASE_COLOR_PRESSED
26-
{ 0, 8, (int)0x282020ff }, // DEFAULT_TEXT_COLOR_PRESSED
26+
{ 0, 8, (int)0x191410ff }, // DEFAULT_TEXT_COLOR_PRESSED
2727
{ 0, 9, (int)0x6a6a6aff }, // DEFAULT_BORDER_COLOR_DISABLED
2828
{ 0, 10, (int)0x818181ff }, // DEFAULT_BASE_COLOR_DISABLED
2929
{ 0, 11, (int)0x606060ff }, // DEFAULT_TEXT_COLOR_DISABLED
3030
{ 0, 16, (int)0x00000010 }, // DEFAULT_TEXT_SIZE
3131
{ 0, 18, (int)0xef922aff }, // DEFAULT_LINE_COLOR
3232
{ 0, 19, (int)0x333333ff }, // DEFAULT_BACKGROUND_COLOR
3333
{ 0, 20, (int)0x00000018 }, // DEFAULT_TEXT_LINE_SPACING
34-
{ 4, 8, (int)0xd4d4d4ff }, // SLIDER_TEXT_COLOR_PRESSED
35-
{ 5, 8, (int)0xd4d4d4ff }, // PROGRESSBAR_TEXT_COLOR_PRESSED
34+
{ 1, 8, (int)0xe7e0d4ff }, // LABEL_TEXT_COLOR_PRESSED
35+
{ 4, 8, (int)0xf1cf9dff }, // SLIDER_TEXT_COLOR_PRESSED
3636
};
3737

38-
// WARNING: This style uses a custom font: "hello-world.ttf" (size: 16, spacing: 1)
38+
// WARNING: This style uses a custom font: "" (size: 16, spacing: 1)
3939

4040
#define AMBER_STYLE_FONT_ATLAS_COMP_SIZE 2605
4141

gui/styles/amber/style_amber.png

33 Bytes
Loading

gui/styles/amber/style_amber.rgs

0 Bytes
Binary file not shown.
76.2 KB
Binary file not shown.
-66.9 KB
Binary file not shown.

gui/styles/rltech/font_readme.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
Every font made by MB03 is 100% free for personal & commercial use.
3+
Including the font(s) in this archive.
4+
5+
6+
7+
~ memesbruh03~
8+
9+
For more cool things, go to...:
10+
https://memesbruh03.neocities.org/

gui/styles/rltech/screenshot.png

22 KB
Loading

gui/styles/rltech/style_rltech.h

Lines changed: 491 additions & 494 deletions
Large diffs are not rendered by default.

gui/styles/rltech/style_rltech.png

-2.06 KB
Loading

gui/styles/rltech/style_rltech.rgs

79 Bytes
Binary file not shown.

gui/styles/style_raylibtech.png

-12.4 KB
Binary file not shown.

gui/styles/style_rtech.h

Lines changed: 0 additions & 606 deletions
This file was deleted.

headers/extras/raygui.h

Lines changed: 121 additions & 50 deletions
Large diffs are not rendered by default.

headers/raylib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,10 +1701,10 @@ RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan
17011701
RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
17021702
RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
17031703

1704-
RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float'
1704+
RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives frames x 2 samples as 'float' (stereo)
17051705
RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
17061706

1707-
RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
1707+
RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo)
17081708
RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
17091709

17101710
#if defined(__cplusplus)

libs/i386-win32/raylib.dll

2.07 KB
Binary file not shown.

libs/x86_32-linux/libraylib.a

2.17 KB
Binary file not shown.

libs/x86_32-linux/libraylib.so

4.15 KB
Binary file not shown.

libs/x86_64-linux/libraylib.a

2.17 KB
Binary file not shown.

libs/x86_64-linux/libraylib.so

4.15 KB
Binary file not shown.

libs/x86_64-win64/raylib.dll

1.57 KB
Binary file not shown.

source/extras/raygui.pas

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{********************************************************************************************
22
* *
3-
* raygui v4.1-dev - A simple and easy-to-use immediate-mode gui library *
3+
* 5.0-dev (2025) Current dev version... *
44
* *
55
* DESCRIPTION: *
66
* *
77
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also *
88
* available as a standalone library, as long as input and drawing functions are provided. *
99
* *
10-
* pascal header 2021 - 2024 by Gunko Vadim *
10+
* pascal header 2021 - 2025 by Gunko Vadim *
1111
* *
1212
*********************************************************************************************}
1313

@@ -26,10 +26,10 @@ interface
2626
raylib;
2727

2828
const
29-
RAYGUI_VERSION_MAJOR = 4;
29+
RAYGUI_VERSION_MAJOR = 5;
3030
RAYGUI_VERSION_MINOR = 0;
3131
RAYGUI_VERSION_PATCH = 0;
32-
RAYGUI_VERSION = '4.1-dev';
32+
RAYGUI_VERSION = '5.0-dev';
3333
SCROLLBAR_LEFT_SIDE = 0;
3434
SCROLLBAR_RIGHT_SIDE = 1;
3535

@@ -310,9 +310,8 @@ interface
310310
STATE_DISABLED = 3;
311311

312312

313-
314-
// Gui control text alignment vertical
315-
// NOTE: Text vertical position inside the text bounds
313+
// Gui control text alignment vertical
314+
// NOTE: Text vertical position inside the text bounds
316315
type
317316
PGuiTextAlignmentVertical = ^TGuiTextAlignmentVertical;
318317
TGuiTextAlignmentVertical = Integer;
@@ -326,17 +325,15 @@ interface
326325
// NOTE: Useful for multiline text
327326
type
328327
PGuiTextWrapMode = ^TGuiTextWrapMode;
329-
TGuiTextWrapMode = Integer;
330-
328+
TGuiTextWrapMode = integer;
331329
const
332330
TEXT_WRAP_NONE = 0;
333331
TEXT_WRAP_CHAR = 1;
334332
TEXT_WRAP_WORD = 2;
335333

336334
type
337335
PGuiTextAlignment = ^TGuiTextAlignment;
338-
TGuiTextAlignment = Integer;
339-
336+
TGuiTextAlignment =integer;
340337
const
341338
TEXT_ALIGN_LEFT = 0;
342339
TEXT_ALIGN_CENTER = 1;
@@ -358,7 +355,7 @@ interface
358355
DROPDOWNBOX = 8;
359356
TEXTBOX = 9;
360357
VALUEBOX = 10;
361-
SPINNER = 11;
358+
CONTROL11 = 11;
362359
LISTVIEW = 12;
363360
COLORPICKER = 13;
364361
SCROLLBAR = 14;
@@ -479,18 +476,18 @@ interface
479476
type
480477
PGuiListViewProperty = ^TGuiListViewProperty;
481478
TGuiListViewProperty = Integer;
482-
483479
const
484480
LIST_ITEMS_HEIGHT = 16; // ListView items height
485481
LIST_ITEMS_SPACING = 17;
486482
SCROLLBAR_WIDTH = 18;
487-
SCROLLBAR_SIDE = 19;
488-
LIST_ITEMS_BORDER_WIDTH = 20; // ListView items border width
489-
// ColorPicker
483+
LIST_ITEMS_BORDER_NORMAL = 19;
484+
SCROLLBAR_SIDE = 20;
485+
LIST_ITEMS_BORDER_WIDTH = 21; // ListView items border width
486+
487+
// ColorPicker
490488
type
491489
PGuiColorPickerProperty = ^TGuiColorPickerProperty;
492490
TGuiColorPickerProperty = Integer;
493-
494491
const
495492
COLOR_SELECTOR_SIZE = 16;
496493
HUEBAR_WIDTH = 17;

source/raylib.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
{.$define RAYGUI_NO_RICONS}
3838

3939
// Other Settings
40+
4041
{$PACKRECORDS C}
4142
{$ALIGN 8}
4243
{$MINENUMSIZE 4}

source/raylib.pas

Lines changed: 79 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A simple and easy-to-use library to enjoy videogames programming ( www.raylib.com )
44
Pascal header by Gunko Vadim (@guvacode)
55
}
6-
{$mode objfpc}{$H+}
6+
{$mode objfpc}{$H+}{$modeswitch advancedrecords}
77
unit raylib;
88
// Include configuration file
99
{$I raylib.inc}
@@ -32,8 +32,9 @@ interface
3232
{ TColorB }
3333
PColorB = ^TColorB;
3434
TColorB = record
35-
r,g,b,a : byte; // Color value
36-
end;
35+
r,g,b,a : byte; // Color value
36+
procedure Create(aR: Byte; aG: Byte; aB: Byte; aA: Byte);
37+
end;
3738

3839
TColor = TColorB;
3940
PColor = PColorB;
@@ -68,12 +69,16 @@ TColorB = record
6869
MAGENTA: TColorB = (r: 255; g: 0; b: 255; a: 255); // Magenta
6970
RAYWHITE: TColorB = (r: 245; g: 245; b: 245; a: 255); // My own White (raylib logo)
7071

71-
(* Vector2, 2 components *)
72+
7273
type
74+
(* Vector2, 2 components *)
7375
PVector2 = ^TVector2;
7476
TVector2 = record
7577
x : single; // Vector x component
7678
y : single; // Vector y component
79+
// {$IFDEF ADVANCEDRECORDS}
80+
procedure Create(aX, aY: single);
81+
// {$ENDIF}
7782
end;
7883

7984
(* Vector3, 3 components *)
@@ -82,6 +87,7 @@ TVector3 = record
8287
x : single; // Vector x component
8388
y : single; // Vector y component
8489
z : single; // Vector z component
90+
procedure Create(aX, aY, aZ: single);
8591
end;
8692

8793
(* Vector4, 4 components *)
@@ -91,6 +97,7 @@ TVector4 = record
9197
y : single; // Vector y component
9298
z : single; // Vector z component
9399
w : single; // Vector w component
100+
procedure Create(aX, aY, aZ, aW: single);
94101
end;
95102

96103
(* Quaternion, 4 components (Vector4 alias) *)
@@ -121,15 +128,17 @@ TMatrix = record
121128
(* Rectangle, 4 components *)
122129
PPRectangle = ^PRectangle;
123130
PRectangle = ^TRectangle;
131+
132+
{ TRectangle }
124133
TRectangle = record
125134
x : single; // Rectangle top-left corner position x
126135
y : single; // Rectangle top-left corner position y
127136
width : single; // Rectangle width
128137
height : single; // Rectangle height
138+
procedure Create(aX, aY, aWidth, aHeight: single);
129139
end;
130140

131141
(* Image, pixel data stored in CPU memory (RAM) *)
132-
133142
PImage = ^TImage;
134143
TImage = record
135144
data : pointer; // Image raw data
@@ -204,12 +213,16 @@ TFont = record
204213
(* Camera, defines position/orientation in 3d space *)
205214
type
206215
PCamera3D = ^TCamera3D;
216+
217+
{ TCamera3D }
218+
207219
TCamera3D = record
208-
position : TVector3; // Camera position
209-
target : TVector3; // Camera target it looks-at
210-
up : TVector3; // Camera up vector (rotation over its axis)
211-
fovy : single; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
212-
projection : Integer; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
220+
position : TVector3; // Camera position
221+
target : TVector3; // Camera target it looks-at
222+
up : TVector3; // Camera up vector (rotation over its axis)
223+
fovy : single; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
224+
projection : Integer; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
225+
procedure Create(aPosition, aTarget, aUp: TVector3; aFOVY: single; aType: integer);
213226
end;
214227

215228
(* Camera type fallback, defaults to Camera3D *)
@@ -332,9 +345,13 @@ TRayCollision = record
332345

333346
(* BoundingBox *)
334347
PBoundingBox = ^TBoundingBox;
348+
349+
{ TBoundingBox }
350+
335351
TBoundingBox = record
336352
min : TVector3; // Minimum vertex box-corner
337353
max : TVector3; // Maximum vertex box-corner
354+
procedure Create(aMin, aMax: TVector3);
338355
end;
339356

340357
(* Wave, audio wave data *)
@@ -2269,11 +2286,11 @@ procedure SetAudioStreamBufferSizeDefault(size: Integer); cdecl; external {$IFND
22692286
{Audio thread callback to request new data}
22702287
procedure SetAudioStreamCallback(stream: TAudioStream; callback: TAudioCallback); cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'SetAudioStreamCallback';
22712288

2272-
{Attach audio stream processor to stream, receives the samples as 'float'}
2289+
{Attach audio stream processor to stream, receives frames x 2 samples as 'float' (stereo)}
22732290
procedure AttachAudioStreamProcessor(stream: TAudioStream; processor: TAudioCallback); cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'AttachAudioStreamProcessor';
22742291
{Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'}
22752292
procedure DetachAudioStreamProcessor(stream: TAudioStream; processor: TAudioCallback); cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'DetachAudioStreamProcessor';
2276-
{Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'}
2293+
{Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo)}
22772294
procedure AttachAudioMixedProcessor(processor: TAudioCallback); cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'AttachAudioMixedProcessor';
22782295
{Detach audio stream processor from the entire audio pipeline}
22792296
procedure DetachAudioMixedProcessor(processor: TAudioCallback); cdecl; external {$IFNDEF RAY_STATIC}cDllName{$ENDIF} name 'DetachAudioMixedProcessor';
@@ -2455,6 +2472,56 @@ procedure Camera3DSet(aCam: PCamera3D; aPosition, aTarget, aUp: TVector3; aFOVY:
24552472
aCam^.projection := aType;
24562473
end;
24572474

2475+
{ TColorB }
2476+
2477+
procedure TColorB.Create(aR: Byte; aG: Byte; aB: Byte; aA: Byte);
2478+
begin
2479+
self := ColorCreate(aR, aG, aB ,aA);
2480+
end;
2481+
2482+
{ TVector2 }
2483+
2484+
procedure TVector2.Create(aX, aY: single);
2485+
begin
2486+
self := Vector2Create(aX,aY);
2487+
end;
2488+
2489+
{ TVector3 }
2490+
2491+
procedure TVector3.Create(aX, aY, aZ: single);
2492+
begin
2493+
self := Vector3Create(aX, aY, aZ);
2494+
end;
2495+
2496+
{ TVector4 }
2497+
2498+
procedure TVector4.Create(aX, aY, aZ, aW: single);
2499+
begin
2500+
self := Vector4Create(aX, aY, aZ, aW);
2501+
end;
2502+
2503+
{ TRectangle }
2504+
2505+
procedure TRectangle.Create(aX, aY, aWidth, aHeight: single);
2506+
begin
2507+
self := RectangleCreate(aX, aY, aWidth, aHeight);
2508+
end;
2509+
2510+
{ TCamera3D }
2511+
2512+
procedure TCamera3D.Create(aPosition, aTarget, aUp: TVector3; aFOVY: single; aType: integer);
2513+
begin
2514+
self := Camera3DCreate(aPosition, aTarget, aUp, aFOVY, aType);
2515+
end;
2516+
2517+
{ TBoundingBox }
2518+
2519+
procedure TBoundingBox.Create(aMin, aMax: TVector3);
2520+
begin
2521+
self := BoundingBoxCreate(aMin, aMax);
2522+
end;
2523+
2524+
24582525

24592526
initialization
24602527
SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]);

0 commit comments

Comments
 (0)