Skip to content

Commit bdce6cb

Browse files
committed
Add missing libs/headers, fix main.c
1 parent b8b05e4 commit bdce6cb

1,721 files changed

Lines changed: 786381 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ endif()
5252
target_include_directories(${APP_LIB_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/deps/raylib")
5353
target_include_directories(${APP_LIB_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/deps/raymob")
5454
target_include_directories(${APP_LIB_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/deps/lua")
55+
target_include_directories(${APP_LIB_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/deps/raygui")
5556
target_include_directories(${APP_LIB_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") # For raylua.h
5657

5758
# Link required libraries to the native application
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.h linguist-language=C
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Object files
2+
*.o
3+
*.ko
4+
*.obj
5+
*.elf
6+
7+
# Precompiled Headers
8+
*.gch
9+
*.pch
10+
11+
# Libraries
12+
*.lib
13+
*.a
14+
*.la
15+
*.lo
16+
17+
# Shared objects (inc. Windows DLLs)
18+
*.dll
19+
*.so
20+
*.so.*
21+
*.dylib
22+
23+
# Executables
24+
*.exe
25+
*.out
26+
*.app
27+
*.i*86
28+
*.x86_64
29+
*.hex
30+
31+
# Debug files
32+
*.dSYM/
33+
*.su
34+
35+
# VSCode files
36+
.vscode/
37+
38+
39+
# Ignore files build by Visual Studio
40+
[Dd]ebug
41+
[Rr]elease
42+
*.vs
43+
*.obj
44+
*.pdb
45+
*.aps
46+
*.user
47+
# *.vcproj
48+
# *.vcxproj*
49+
# *.sln
50+
*.vspscc
51+
*_i.c
52+
*.i
53+
*.icf
54+
*_p.c
55+
*.ncb
56+
*.suo
57+
*.tlb
58+
*.tlh
59+
*.bak
60+
*.cache
61+
*.ilk
62+
*.log
63+
64+
build
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## raygui history
2+
3+
raygui development started on December 2014 by two internship students (Kevin and Daniel) guided by me, objective was creating a simple and easy-to-use immediate-mode-gui module for raylib, intended for tools development. On June 2015, library was mostly functional (including basic controls) and we started working in the styling posibilities for the library, focusing on an easy way to style controls properties. Consequently, development of [rGuiStyler](https://raylibtech.itch.io/rguistyler) also started at that point... but resources were quite limited and project was stopped for several months, most of the time was invested in [raylib](https://github.com/raysan5/raylib) development.
4+
5+
On June 2016, project was picked up again and raygui 1.0 was released by the end of that month. During August 2016, raygui was used to develop [rFXGen](https://github.com/raysan5/rfxgen) and also an early protoype of [rGuiLayout](https://raylibtech.itch.io/rguilayout), those tools were a testbed for the library. By the end of 2016, raygui project development was stopped again for several months.
6+
7+
On June 2017, a complete redesign of the library started, almost from scratch, all functions were reviewed and mostly rewritten and a brand new styling system was developed. The objective was using raygui professionally in several tools. It was the beginning of raygui 2.0.
8+
9+
On January 2018, two students (Adria and Jordi) started working on raygui and related tools; library evolved considerably in the following months. [rGuiStyler](https://raylibtech.itch.io/rguistyler) was completely redesigned and rewritten from scratch (rGuiStyler v2.0). [rGuiLayout](https://raylibtech.itch.io/rguilayout) turned from a protoype into a professional software and raygui reached version 2.0 with plenty of new controls and features.
10+
11+
On July 2018, I started working full time on raygui and its tools, improving the library considerably. On October 2018 [Sergio](https://github.com/anidealgift) joined the project and focused efforts on [rGuiLayout](https://raylibtech.itch.io/rguilayout) tool redesign. We reached 2019 with continuous improvement and redesigns of mostly all raygui functions along rGuiLayout 2.0 and rGuiStyler 3.0.
12+
13+
On March 2019, the first set of new raygui tools was published: [rFXGen 2.0](https://raylibtech.itch.io/rfxgen), [rTexViewer 1.0](https://raylibtech.itch.io/rtexviewer) and [rIconPacker 1.0](https://raylibtech.itch.io/riconpacker).
14+
15+
From March 2019 to June 2019 raygui development decelerated, Sergio left the project and efforts were focused on raylib 2.5, during this time one external contributor, [Vlad Adrian](https://github.com/Demizdor), completely redesigned `GuiTextBox()` and related controls and version was bumped to raygui 2.5.
16+
17+
During summer 2019 lots of raygui functions were reviewed, breaking compatibility to any previous version and pointing to a **raygui 2.6** update.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
zlib License
2+
3+
Copyright (c) 2014-2025 Ramon Santamaria (@raysan5)
4+
5+
This software is provided "as-is", without any express or implied warranty. In no event
6+
will the authors be held liable for any damages arising from the use of this software.
7+
8+
Permission is granted to anyone to use this software for any purpose, including commercial
9+
applications, and to alter it and redistribute it freely, subject to the following restrictions:
10+
11+
1. The origin of this software must not be misrepresented; you must not claim that you
12+
wrote the original software. If you use this software in a product, an acknowledgment
13+
in the product documentation would be appreciated but is not required.
14+
15+
2. Altered source versions must be plainly marked as such, and must not be misrepresented
16+
as being the original software.
17+
18+
3. This notice may not be removed or altered from any source distribution.
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<img align="left" src="logo/raygui_256x256.png" width=256>
2+
3+
**raygui is a simple and easy-to-use immediate-mode-gui library.**
4+
5+
`raygui` was originally inspired by [Unity IMGUI](https://docs.unity3d.com/Manual/GUIScriptingGuide.html) (immediate mode GUI API).
6+
7+
`raygui` was designed as an auxiliary module for [raylib](https://github.com/raysan5/raylib) to create simple GUI interfaces using raylib graphic style (simple colors, plain rectangular shapes, wide borders...) but it can be adapted to other engines/frameworks.
8+
9+
`raygui` is intended for **tools development**; it has already been used to develop [multiple published tools](https://raylibtech.itch.io).
10+
11+
<br>
12+
13+
**WARNING: Latest `raygui` from master branch is always aligned with latest `raylib` from master branch. Make sure to use the appropiate versions.**
14+
15+
**WARNING: Latest `raygui 4.0` is an API-BREAKING redesign from previous versions (3.x), now all functions are more consistent and coherent, you can read the details about this breaking change in issue [283](https://github.com/raysan5/raygui/issues/283)**
16+
17+
*NOTE: raygui is a single-file header-only library (despite its internal dependency on raylib), so, functions definition AND implementation reside in the same file `raygui.h`, when including `raygui.h` in a module, `RAYGUI_IMPLEMENTATION` must be previously defined to include the implementation part of `raygui.h` BUT only in one compilation unit, other modules could also include `raygui.h` but `RAYGUI_IMPLEMENTATION` must not be defined again.*
18+
19+
## features
20+
21+
- **Immediate-mode gui, no retained data**
22+
- **+25** controls provided (basic and advanced)
23+
- Powerful **styling system** for colors, font and metrics
24+
- Standalone usage mode supported (for other graphic libs)
25+
- **Icons support**, embedding a complete 1-bit icons pack
26+
- Multiple **tools** provided for raygui development
27+
28+
## code sample
29+
```c
30+
#include "raylib.h"
31+
32+
#define RAYGUI_IMPLEMENTATION
33+
#include "raygui.h"
34+
35+
int main()
36+
{
37+
InitWindow(400, 200, "raygui - controls test suite");
38+
SetTargetFPS(60);
39+
40+
bool showMessageBox = false;
41+
42+
while (!WindowShouldClose())
43+
{
44+
// Draw
45+
//----------------------------------------------------------------------------------
46+
BeginDrawing();
47+
ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)));
48+
49+
if (GuiButton((Rectangle){ 24, 24, 120, 30 }, "#191#Show Message")) showMessageBox = true;
50+
51+
if (showMessageBox)
52+
{
53+
int result = GuiMessageBox((Rectangle){ 85, 70, 250, 100 },
54+
"#191#Message Box", "Hi! This is a message!", "Nice;Cool");
55+
56+
if (result >= 0) showMessageBox = false;
57+
}
58+
59+
EndDrawing();
60+
}
61+
62+
CloseWindow();
63+
return 0;
64+
}
65+
```
66+
![screenshot000](https://github.com/raysan5/raygui/assets/5766837/170e2bce-b7ca-49dc-a263-32b673376546)
67+
68+
## raygui controls
69+
70+
### basic controls
71+
```
72+
Label | Button | LabelButton | Toggle | ToggleGroup | ToggleSlider
73+
CheckBox | ComboBox | DropdownBox | TextBox | ValueBox | Spinner
74+
Slider | SliderBar | ProgressBar | StatusBar | DummyRec | Grid
75+
```
76+
### container/separator controls
77+
```
78+
WindowBox | GroupBox | Line | Panel | ScrollPanel | TabBar
79+
```
80+
### advanced controls
81+
```
82+
ListView | ColorPicker | MessageBox | TextInputBox
83+
```
84+
85+
86+
## raygui styles
87+
88+
`raygui` comes with a [default](styles/default) style automatically loaded at runtime:
89+
90+
![raygui default style](styles/default/style_default.png)
91+
92+
Some additional styles are also provided for convenience, just check [styles directory](styles) for details:
93+
94+
![raygui additional styles](images/raygui_style_table_multi.png)
95+
96+
Custom styles can also be created very easily using [rGuiStyler](https://raylibtech.itch.io/rguistyler) tool.
97+
98+
Styles can be loaded at runtime using raygui `GuiLoadStyle()` function. Simple and easy-to-use.
99+
100+
## raygui icons
101+
102+
`raygui` supports custom icons, by default, a predefined set of icons is provided inside `raygui` as an array of binary data; it contains **256 possible icons** defined as **16x16 pixels** each; each pixel is codified using **1-bit**. The total size of the array is `2048 bytes`.
103+
104+
<img align="right" src="images/raygui_ricons.png">
105+
106+
To use any of those icons just prefix the *#iconId#* number to **any text** written within `raygui` controls:
107+
```c
108+
if (GuiButton(rec, "#05#Open Image")) { /* ACTION */ }
109+
```
110+
It's also possible to use the provided `GuiIconText()` function to prefix it automatically, using a clearer identifier (defined in `raygui.h`).
111+
```c
112+
if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ }
113+
```
114+
Provided set of icons can be reviewed and customized using [rGuiIcons](https://raylibtech.itch.io/rguiicons) tool.
115+
116+
## raygui support tools
117+
118+
- [**rGuiStyler**](https://raylibtech.itch.io/rguistyler) - A simple and easy-to-use raygui styles editor.
119+
120+
![rGuiStyler v3.1](images/rguistyler_v300.png)
121+
122+
- [**rGuiIcons**](https://raylibtech.itch.io/rguiicons) - A simple and easy-to-use raygui icons editor.
123+
124+
![rGuiIcons v1.0](images/rguiicons_v100.png)
125+
126+
- [**rGuiLayout**](https://raylibtech.itch.io/rguilayout) - A simple and easy-to-use raygui layouts editor.
127+
128+
![rGuiLayout v2.2](images/rguilayout_v220.png)
129+
130+
## building
131+
132+
`raygui` is intended to be used as a portable single-file header-only library, to be directly integrated into any C/C++ codebase but some users could require a shared/dynamic version of the library, for example, to create bindings:
133+
134+
- **Windows (MinGW, GCC)**
135+
```
136+
copy src/raygui.h src/raygui.c
137+
gcc -o src/raygui.dll src/raygui.c -shared -DRAYGUI_IMPLEMENTATION -DBUILD_LIBTYPE_SHARED -static-libgcc -lopengl32 -lgdi32 -lwinmm -Wl,--out-implib,src/librayguidll.a
138+
```
139+
140+
- **Windows (MSVC)**
141+
```
142+
copy src\raygui.h src\raygui.c
143+
cl /O2 /I../raylib/src/ /D_USRDLL /D_WINDLL /DRAYGUI_IMPLEMENTATION /DBUILD_LIBTYPE_SHARED src/raygui.c /LD /Feraygui.dll /link /LIBPATH ../raylib/build/raylib/Release/raylib.lib /subsystem:windows /machine:x64
144+
```
145+
146+
- **Linux (GCC)**
147+
```
148+
mv src/raygui.h src/raygui.c
149+
gcc -o raygui.so src/raygui.c -shared -fpic -DRAYGUI_IMPLEMENTATION -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
150+
mv src/raygui.c src/raygui.h
151+
```
152+
153+
- **Mac (clang, homebrew installed raylib)**
154+
```
155+
cp src/raygui.h src/raygui.c
156+
brew install raylib
157+
gcc -o raygui.dynlib src/raygui.c -shared -fpic -DRAYGUI_IMPLEMENTATION -framework OpenGL -lm -lpthread -ldl $(pkg-config --libs --cflags raylib)
158+
```
159+
160+
161+
## license
162+
163+
raygui is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.

0 commit comments

Comments
 (0)