67 Commits
2.8 ... 3.0

Author SHA1 Message Date
af51e4ccf7 Fix README.md spelling: "publised" => "published" (#162) 2021-11-02 13:22:35 +01:00
Ray
61c6bd22f9 Moved extra controls to extra directory 2021-11-02 11:35:33 +01:00
Ray
0d3dc299cd Update raygui.h 2021-10-31 23:18:57 +01:00
ba2fdec93b Update raygui.h 2021-10-19 14:58:19 +02:00
a5068756be Some tweaks to simplify code 2021-10-18 12:54:28 +02:00
Ray
22c0b5754a Update raygui.h 2021-10-16 00:14:48 +02:00
Ray
e4db44518e Update README.md 2021-10-12 15:58:46 +02:00
4e1a1d2348 WARNING: REMOVED: GuiImageButton()
This controls require an external texture provided and a specific function to draw that texture. Personally I never used it and I feel it shouldn't belong to raygui. Anyone requiring to use an `ImageButton` should probably create it using the backend graphics library and the types/functions defined.
2021-10-12 15:39:38 +02:00
405f7ab7e8 Reviewed changelog 2021-10-12 15:36:42 +02:00
e86d0dc2bf Merge branch 'master' of https://github.com/raysan5/raygui 2021-10-12 15:23:34 +02:00
a456bcb763 Reviewed some TODO 2021-10-12 15:23:11 +02:00
Ray
31a38d34fc Update README.md 2021-10-12 15:13:41 +02:00
a770a93fb2 Remove some warnings 2021-10-12 14:52:04 +02:00
Ray
1a9f0fbe9c Update README.md 2021-10-07 16:12:17 +02:00
Ray
283716857c Remove trailing spaces 2021-10-06 01:23:17 +02:00
2fa812484c Merge branch 'master' of https://github.com/raysan5/raygui 2021-10-05 18:33:06 +02:00
f822fb1468 REVIEWED: API functions specifiers 2021-10-05 18:33:02 +02:00
Ray
8c70f3315a Update README.md 2021-10-05 16:00:25 +02:00
8993f07c94 Merge branch 'master' of https://github.com/raysan5/raygui 2021-10-05 14:10:51 +02:00
7c63e389b8 Reviewed examples for latest raygui/raylib 2021-10-05 14:10:35 +02:00
0ed765cd8b raygui includes RICONS by default
- REAMED: RAYUIDEF -> RAYGUIAPI
2021-10-05 14:10:20 +02:00
Ray
f1853f50e7 Update README.md 2021-10-05 13:45:17 +02:00
b0dfa6dcbf Merge branch 'master' of https://github.com/raysan5/raygui 2021-10-05 12:48:21 +02:00
f7abbc055f Added tools images 2021-10-05 12:48:18 +02:00
Ray
46243ef6d2 Update README.md 2021-10-05 12:47:54 +02:00
2bb3e17c1e REVIEWED: GuiDropdownBox() locking mechanism #139 2021-10-05 11:23:58 +02:00
734d067335 Update project to VS2019 2021-10-05 11:23:05 +02:00
e81fd89b6d Modify custom_file_dialog, portable_window, propertly_list, and text_editor examples to be compatible with the newest raylib and raygui (#156)
Modify gui_textbox_extended.h to contain DrawTextRec and DrawTextRecEx since they were cut from raylib, also add DrawTextBoxedSelectable as an alias for DrawTextRecEx for compatibility/name consistency
Modify gui_textbox_extended.h to be compatible with the latest raylib
2021-09-19 20:15:24 +02:00
c1af7c3edd Move declarations of GetCodepoint() and CodepointToUTF8() (#155) 2021-09-12 18:04:22 +02:00
Ray
469496d177 ADDED: Auxiliar function for standalone mode 2021-09-11 10:37:06 +02:00
Ray
653ee23f58 REMOVED: GuiColorPanelEx() 2021-09-10 22:58:40 +02:00
Ray
181f41cee0 Improve documentation 2021-09-10 00:55:34 +02:00
Ray
d45a0f55f1 ADDED: GuiIsLocked() #140 2021-09-06 00:53:46 +02:00
Ray
3e1162bb9a Review breaking changes from PRs 2021-09-06 00:24:39 +02:00
Ray
fc43382050 Update raygui.h 2021-09-06 00:16:15 +02:00
c1d906855b fix missing borderwidth (#134)
* fix missing borderwidth

* made guibox text borderwidth independent

* undid for textbox & textboxmulti
2021-09-06 00:15:58 +02:00
d871bc0641 Hue and alpha bar fix (#130)
* hue and alpha color bar fix

fixes issues with the slider going over the end of the bar
fixes color on colorbar to:
- not get smaller when the overflow increases
- not have a small white rectangle at the bottom

* switched back to DrawRectangleGradientV
2021-09-06 00:13:05 +02:00
Ray
8197be08d8 REVIEWED: GuiTextBox() #106 2021-09-03 00:44:11 +02:00
Ray
424ad14d3c Manually implement #131 2021-09-03 00:38:06 +02:00
Ray
c3dc43d4c5 REVIEWED: Consistency with raylib 2021-09-02 00:36:37 +02:00
Ray
cf45f9bccf REVIEWED: GuiTextBoxMulti()
- REMOVED: framesCounter (static variable)
- REVIEWED: Cursors width
- Minor tweaks
2021-09-01 00:52:57 +02:00
Ray
873c6a95b3 WARNING: BREAKING: Embedded ricons into raygui
- ADDED: `RAYGUI_SUPPORT_CUSTOM_RICONS` for external `ricons.h`
- RENAMED: Some defines for consistency and make them private
- Increased version to 3.0-dev
2021-08-25 00:45:49 +02:00
Ray
24e0dd6600 Update gui_textbox_extended.h 2021-08-25 00:42:56 +02:00
Ray
2083c6984a Update textbox_extended_demo.c 2021-08-25 00:42:45 +02:00
Ray
0907bee71b Renamed file 2021-08-25 00:42:33 +02:00
65e39bb4bc WARNING: BREAKING: Updated to latest raylib 2021-08-15 13:07:55 +02:00
bad9c8bb58 Replace TABS by 4 spaces 2021-07-28 12:55:58 +02:00
d5856e5182 Minor tweaks 2021-07-09 18:49:50 +02:00
76c6184c49 Added a note to build as shared library #146 2021-07-06 19:13:17 +02:00
6edd0865c0 Skip icons name if required #132
Probably this system should be redesigned
2021-07-05 19:30:30 +02:00
a4a6ff98b3 REVIEWED: Update function for raylib 3.8-dev #147 2021-07-05 19:08:02 +02:00
Ray
78f24a3868 Update text_editor.c 2021-06-23 09:59:37 +02:00
045d4856f0 Edit LICENSE to 2021 (#142) 2021-05-23 10:51:03 +02:00
d215533b5a Fix broken 'riconsdata' link in README.md (#141) 2021-05-17 16:53:42 +02:00
806b216e20 Move cplusplus curly brace and RAYGUI_H endifs above (#137) 2021-05-09 10:19:25 +02:00
d77bd5f3ef Scroll panel fix (#129)
* scrollPanel fix

fixed a bug of the scrollbars disappearing
implemented checking of scrollbar side for drawing the little rectangle

* readded (int) cast
2021-04-17 09:51:46 +02:00
c2bee39e0b REVIEWED: GuiProgressBar() #128 2021-04-05 13:50:07 +02:00
d2752e9a47 Reviewed examples 2021-04-02 16:32:14 +02:00
Ray
6b216626ec Remove trailing spaces 2021-03-19 20:12:50 +01:00
Ray
13aac618ad Removed tooltip API 2021-03-17 14:39:46 +01:00
Ray
a11fb5f38d Update image_raw_importer.c 2021-03-14 13:11:35 +01:00
Ray
ef99aafee9 Renamed some functions 2021-03-12 18:01:14 +01:00
3749de3ef8 Fix typecast warnings (#118) 2021-02-24 09:30:09 +01:00
0cbbb48410 Fixed bug with stuck slide bars (#122)
Corrected arguments taken by GuiSliderBar functions that correspond to panelContentRec dimensions
2021-02-24 09:28:21 +01:00
3627bb960a Move include guard endif to end of file (#121)
Resolves #120
2021-02-01 12:59:15 +01:00
28d7584fc1 Corrected build mode typo #117 2020-12-30 17:41:57 +01:00
b4288f969c Add horizontal scroll (#116)
Add horizontal scroll (Shift + Mouse wheel) for Scroll Panel control
2020-12-28 20:42:20 +01:00
23 changed files with 1671 additions and 1409 deletions

View File

@ -1,6 +1,6 @@
zlib License zlib License
Copyright (c) 2014-2020 Ramon Santamaria (@raysan5) Copyright (c) 2014-2021 Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event 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. will the authors be held liable for any damages arising from the use of this software.

View File

@ -1,35 +1,44 @@
<img align="left" src="logo/raygui_256x256.png" width=256> <img align="left" src="logo/raygui_256x256.png" width=256>
**raygui** is a simple and easy-to-use immediate-mode-gui library. **raygui is a simple and easy-to-use immediate-mode-gui library.**
raygui was initially inspired by [Unity IMGUI](https://docs.unity3d.com/Manual/GUIScriptingGuide.html) (immediate mode GUI API). `raygui` was initially inspired by [Unity IMGUI](https://docs.unity3d.com/Manual/GUIScriptingGuide.html) (immediate mode GUI API).
raygui was originated as an auxiliar module for [raylib](https://github.com/raysan5/raylib) to create simple GUI interfaces using raylib graphic style (simple colors, plain rectangular shapes, wide borders...). `raygui` was originated as an auxiliar module for [raylib](https://github.com/raysan5/raylib) to create simple GUI interfaces using raylib graphic style (simple colors, plain rectangular shapes, wide borders...).
raygui is intended for **tools development**; it has already been used to develop the following tools: [rFXGen](https://github.com/raysan5/rfxgen), [rTexViewer](https://raylibtech.itch.io/rtexviewer), [rTexPacker](https://raylibtech.itch.io/rtexpacker) [rGuiStyler](https://raylibtech.itch.io/rguistyler), [rGuiLayout](https://raylibtech.itch.io/rguilayout) and [rGuiIcons](https://raylibtech.itch.io/rguiicons) `raygui` is intended for **tools development**; it has already been used to develop [multiple published tools](https://raylibtech.itch.io/rguiicons).
<br> <br>
## raygui provided controls ## features
#### Container/separator controls - **Immediate-mode** gui, no retained data
- **+28** basic and advance controls provided
- Powerful **styling system** for colors, font and metrics
- Standalone usage mode supported (for other graphic libs)
- **Icons support**, embedding a complete 1-bit icons pack
- Multiple **tools** provided for raygui development
## raygui controls
### basic controls
``` ```
WindowBox | GroupBox | Line | Panel Label | Button | LabelButton | Toggle | ToggleGroup | CheckBox
``` ComboBox | DropdownBox | TextBox | TextBoxMulti | ValueBox | Spinner | Slider
#### Basic controls
```
Label | Button | LabelButton | ImageButton | Toggle | ToggleGroup | CheckBox
ComboBox | DropdownBox | TextBox | TextBoxMulti | ValueBox | Spinner | Slider
SliderBar | ProgressBar | StatusBar | ScrollBar | ScrollPanel | DummyRec | Grid SliderBar | ProgressBar | StatusBar | ScrollBar | ScrollPanel | DummyRec | Grid
``` ```
#### Advance controls ### advance controls
``` ```
ListView | ColorPicker | MessageBox | TextInputBox ListView | ColorPicker | MessageBox | TextInputBox
``` ```
### container/separator controls
```
WindowBox | GroupBox | Line | Panel
```
## raygui styles ## raygui styles
raygui comes with a [default](styles/default) style automatically loaded at runtime: `raygui` comes with a [default](styles/default) style automatically loaded at runtime:
![raygui default style](styles/default/style_table.png) ![raygui default style](styles/default/style_table.png)
@ -37,37 +46,56 @@ Some additional styles are also provided for convenience, just check [styles dir
![raygui additional styles](images/raygui_style_table_multi.png) ![raygui additional styles](images/raygui_style_table_multi.png)
Custom styles can also be created very easily using [rGuiStyler](https://raylibtech.itch.io/rguistyler) tool. Custom styles can also be created very easily using [rGuiStyler](https://raylibtech.itch.io/rguistyler) tool.
Styles can be loaded at runtime using raygui `GuiLoadStyle()` function. Simple and easy-to-use. Styles can be loaded at runtime using raygui `GuiLoadStyle()` function. Simple and easy-to-use.
![rGuiStyler v3.1](images/rguistyler_v300.png)
*rGuiStyler v3.1 - raygui styles editor, useful to create custom styles*
## raygui icons ## raygui icons
`raygui` supports custom icons provided as an external array of data. To support icons just define `RAYGUI_SUPPORT_ICONS` before including `raygui`. `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`.
A set of custom handcrafted icons is provided in [`riconsdata`](src/riconsdata.h). This set of icons can be created and customized using [rGuiIcons](https://raylibtech.itch.io/rguiicons) tool.
<img align="right" src="images/raygui_ricons.png"> <img align="right" src="images/raygui_ricons.png">
```c To use any of those icons just prefix the *#iconId#* number to **any text** written within `raygui` controls:
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_ICONS
#include "raygui.h"
```
To use any of those icons in your gui, just preprend *iconId* to any text written within `raygui` controls:
```c ```c
if (GuiButton(rec, "#05#Open Image")) { /* ACTION */ } if (GuiButton(rec, "#05#Open Image")) { /* ACTION */ }
``` ```
or use the provided `GuiIconText()` function to prepend it automatically, using a clearer identifier. It's also possible to use the provided `GuiIconText()` function to prefix it automatically, using a clearer identifier (defined in `raygui.h`).
```c ```c
if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ } if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ }
``` ```
Provided set of icons can be reviewed and customized using [rGuiIcons](https://raylibtech.itch.io/rguiicons) tool.
license ## raygui support tools
-------
- [**rGuiStyler**](https://raylibtech.itch.io/rguistyler) - A simple and easy-to-use raygui styles editor.
![rGuiStyler v3.1](images/rguistyler_v300.png)
- [**rGuiIcons**](https://raylibtech.itch.io/rguiicons) - A simple and easy-to-use raygui icons editor.
![rGuiIcons v1.0](images/rguiicons_v100.png)
- [**rGuiLayout**](https://raylibtech.itch.io/rguilayout) - A simple and easy-to-use raygui layouts editor.
![rGuiLayout v2.2](images/rguilayout_v220.png)
## building
`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:
- **Windows (MinGW, GCC)**
```
copy src/raylib.h src/raylib.c
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
```
- **Linux (GCC)**
```
mv src/raygui.h src/raygui.c
gcc -o raygui.so src/raygui.c -shared -fpic -DRAYGUI_IMPLEMENTATION -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
```
## license
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. 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.

View File

@ -22,25 +22,24 @@
* *
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 2.6-dev - Windowing/input management and drawing. * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.6-dev - Immediate-mode GUI controls. * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2020 Ramon Santamaria (@raysan5) * Copyright (c) 2016-2021 Ramon Santamaria (@raysan5)
* *
**********************************************************************************************/ **********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_ICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
#undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again #include <string.h> // Required for: strcpy()
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Program main entry point // Program main entry point
@ -49,9 +48,9 @@ int main()
{ {
// Initialization // Initialization
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
int screenWidth = 690; const int screenWidth = 690;
int screenHeight = 560; const int screenHeight = 560;
InitWindow(screenWidth, screenHeight, "raygui - controls test suite"); InitWindow(screenWidth, screenHeight, "raygui - controls test suite");
SetExitKey(0); SetExitKey(0);
@ -59,19 +58,19 @@ int main()
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
int dropdownBox000Active = 0; int dropdownBox000Active = 0;
bool dropDown000EditMode = false; bool dropDown000EditMode = false;
int dropdownBox001Active = 0; int dropdownBox001Active = 0;
bool dropDown001EditMode = false; bool dropDown001EditMode = false;
int spinner001Value = 0; int spinner001Value = 0;
bool spinnerEditMode = false; bool spinnerEditMode = false;
int valueBox002Value = 0; int valueBox002Value = 0;
bool valueBoxEditMode = false; bool valueBoxEditMode = false;
char textBoxText[64] = "Text box"; char textBoxText[64] = "Text box";
bool textBoxEditMode = false; bool textBoxEditMode = false;
int listViewScrollIndex = 0; int listViewScrollIndex = 0;
int listViewActive = -1; int listViewActive = -1;
@ -83,32 +82,32 @@ int main()
char multiTextBoxText[256] = "Multi text box"; char multiTextBoxText[256] = "Multi text box";
bool multiTextBoxEditMode = false; bool multiTextBoxEditMode = false;
Color colorPickerValue = RED; Color colorPickerValue = RED;
int sliderValue = 50; int sliderValue = 50;
int sliderBarValue = 60; int sliderBarValue = 60;
float progressValue = 0.4f; float progressValue = 0.4f;
bool forceSquaredChecked = false; bool forceSquaredChecked = false;
float alphaValue = 0.5f; float alphaValue = 0.5f;
int comboBoxActive = 1; int comboBoxActive = 1;
int toggleGroupActive = 0; int toggleGroupActive = 0;
Vector2 viewScroll = { 0, 0 }; Vector2 viewScroll = { 0, 0 };
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Custom GUI font loading // Custom GUI font loading
//Font font = LoadFontEx("fonts/rainyhearts16.ttf", 12, 0, 0); //Font font = LoadFontEx("fonts/rainyhearts16.ttf", 12, 0, 0);
//GuiSetFont(font); //GuiSetFont(font);
bool exitWindow = false; bool exitWindow = false;
bool showMessageBox = false; bool showMessageBox = false;
char textInput[256] = { 0 }; char textInput[256] = { 0 };
bool showTextInputBox = false; bool showTextInputBox = false;
char textInputFileName[256] = { 0 }; char textInputFileName[256] = { 0 };
SetTargetFPS(60); SetTargetFPS(60);
@ -120,18 +119,18 @@ int main()
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
exitWindow = WindowShouldClose(); exitWindow = WindowShouldClose();
if (IsKeyPressed(KEY_ESCAPE)) showMessageBox = !showMessageBox; if (IsKeyPressed(KEY_ESCAPE)) showMessageBox = !showMessageBox;
if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_S)) showTextInputBox = true; if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_S)) showTextInputBox = true;
if (IsFileDropped()) if (IsFileDropped())
{ {
int dropsCount = 0; int dropFileCount = 0;
char **droppedFiles = GetDroppedFiles(&dropsCount); char **droppedFiles = GetDroppedFiles(&dropFileCount);
if ((dropsCount > 0) && IsFileExtension(droppedFiles[0], ".rgs")) GuiLoadStyle(droppedFiles[0]); if ((dropFileCount > 0) && IsFileExtension(droppedFiles[0], ".rgs")) GuiLoadStyle(droppedFiles[0]);
ClearDroppedFiles(); // Clear internal buffers ClearDroppedFiles(); // Clear internal buffers
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -141,40 +140,39 @@ int main()
BeginDrawing(); BeginDrawing();
ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)));
// raygui: controls drawing // raygui: controls drawing
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
if (dropDown000EditMode || dropDown001EditMode) GuiLock(); if (dropDown000EditMode || dropDown001EditMode) GuiLock();
else if (!dropDown000EditMode && !dropDown001EditMode) GuiUnlock();
//GuiDisable(); //GuiDisable();
// First GUI column // First GUI column
//GuiSetStyle(CHECKBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT); //GuiSetStyle(CHECKBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
forceSquaredChecked = GuiCheckBox((Rectangle){ 25, 108, 15, 15 }, "FORCE CHECK!", forceSquaredChecked); forceSquaredChecked = GuiCheckBox((Rectangle){ 25, 108, 15, 15 }, "FORCE CHECK!", forceSquaredChecked);
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER); GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
//GuiSetStyle(VALUEBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT); //GuiSetStyle(VALUEBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
if (GuiSpinner((Rectangle){ 25, 135, 125, 30 }, NULL, &spinner001Value, 0, 100, spinnerEditMode)) spinnerEditMode = !spinnerEditMode; if (GuiSpinner((Rectangle){ 25, 135, 125, 30 }, NULL, &spinner001Value, 0, 100, spinnerEditMode)) spinnerEditMode = !spinnerEditMode;
if (GuiValueBox((Rectangle){ 25, 175, 125, 30 }, NULL, &valueBox002Value, 0, 100, valueBoxEditMode)) valueBoxEditMode = !valueBoxEditMode; if (GuiValueBox((Rectangle){ 25, 175, 125, 30 }, NULL, &valueBox002Value, 0, 100, valueBoxEditMode)) valueBoxEditMode = !valueBoxEditMode;
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT); GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
if (GuiTextBox((Rectangle){ 25, 215, 125, 30 }, textBoxText, 64, textBoxEditMode)) textBoxEditMode = !textBoxEditMode; if (GuiTextBox((Rectangle){ 25, 215, 125, 30 }, textBoxText, 64, textBoxEditMode)) textBoxEditMode = !textBoxEditMode;
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER); GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
GuiSetTooltip("Save current file.");
if (GuiButton((Rectangle){ 25, 255, 125, 30 }, GuiIconText(RICON_FILE_SAVE, "Save File"))) showTextInputBox = true; if (GuiButton((Rectangle){ 25, 255, 125, 30 }, GuiIconText(RICON_FILE_SAVE, "Save File"))) showTextInputBox = true;
GuiClearTooltip();
GuiGroupBox((Rectangle){ 25, 310, 125, 150 }, "STATES"); GuiGroupBox((Rectangle){ 25, 310, 125, 150 }, "STATES");
GuiLock(); //GuiLock();
GuiSetState(GUI_STATE_NORMAL); if (GuiButton((Rectangle){ 30, 320, 115, 30 }, "NORMAL")) { } GuiSetState(GUI_STATE_NORMAL); if (GuiButton((Rectangle){ 30, 320, 115, 30 }, "NORMAL")) { }
GuiSetState(GUI_STATE_FOCUSED); if (GuiButton((Rectangle){ 30, 355, 115, 30 }, "FOCUSED")) { } GuiSetState(GUI_STATE_FOCUSED); if (GuiButton((Rectangle){ 30, 355, 115, 30 }, "FOCUSED")) { }
GuiSetState(GUI_STATE_PRESSED); if (GuiButton((Rectangle){ 30, 390, 115, 30 }, "#15#PRESSED")) { } GuiSetState(GUI_STATE_PRESSED); if (GuiButton((Rectangle){ 30, 390, 115, 30 }, "#15#PRESSED")) { }
GuiSetState(GUI_STATE_DISABLED); if (GuiButton((Rectangle){ 30, 425, 115, 30 }, "DISABLED")) { } GuiSetState(GUI_STATE_DISABLED); if (GuiButton((Rectangle){ 30, 425, 115, 30 }, "DISABLED")) { }
GuiSetState(GUI_STATE_NORMAL); GuiSetState(GUI_STATE_NORMAL);
GuiUnlock(); //GuiUnlock();
comboBoxActive = GuiComboBox((Rectangle){ 25, 470, 125, 30 }, "ONE;TWO;THREE;FOUR", comboBoxActive); comboBoxActive = GuiComboBox((Rectangle){ 25, 470, 125, 30 }, "ONE;TWO;THREE;FOUR", comboBoxActive);
// NOTE: GuiDropdownBox must draw after any other control that can be covered on unfolding // NOTE: GuiDropdownBox must draw after any other control that can be covered on unfolding
GuiSetStyle(DROPDOWNBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT); GuiSetStyle(DROPDOWNBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
if (GuiDropdownBox((Rectangle){ 25, 65, 125, 30 }, "#01#ONE;#02#TWO;#03#THREE;#04#FOUR", &dropdownBox001Active, dropDown001EditMode)) dropDown001EditMode = !dropDown001EditMode; if (GuiDropdownBox((Rectangle){ 25, 65, 125, 30 }, "#01#ONE;#02#TWO;#03#THREE;#04#FOUR", &dropdownBox001Active, dropDown001EditMode)) dropDown001EditMode = !dropDown001EditMode;
@ -187,51 +185,49 @@ int main()
listViewExActive = GuiListViewEx((Rectangle){ 165, 180, 140, 200 }, listViewExList, 8, &listViewExFocus, &listViewExScrollIndex, listViewExActive); listViewExActive = GuiListViewEx((Rectangle){ 165, 180, 140, 200 }, listViewExList, 8, &listViewExFocus, &listViewExScrollIndex, listViewExActive);
toggleGroupActive = GuiToggleGroup((Rectangle){ 165, 400, 140, 25 }, "#1#ONE\n#3#TWO\n#8#THREE\n#23#", toggleGroupActive); toggleGroupActive = GuiToggleGroup((Rectangle){ 165, 400, 140, 25 }, "#1#ONE\n#3#TWO\n#8#THREE\n#23#", toggleGroupActive);
// Third GUI column // Third GUI column
if (GuiTextBoxMulti((Rectangle){ 320, 25, 225, 140 }, multiTextBoxText, 256, multiTextBoxEditMode)) multiTextBoxEditMode = !multiTextBoxEditMode; if (GuiTextBoxMulti((Rectangle){ 320, 25, 225, 140 }, multiTextBoxText, 256, multiTextBoxEditMode)) multiTextBoxEditMode = !multiTextBoxEditMode;
colorPickerValue = GuiColorPicker((Rectangle){ 320, 185, 196, 192 }, colorPickerValue); colorPickerValue = GuiColorPicker((Rectangle){ 320, 185, 196, 192 }, colorPickerValue);
sliderValue = GuiSlider((Rectangle){ 355, 400, 165, 20 }, "TEST", TextFormat("%2.2f", (float)sliderValue), sliderValue, -50, 100); sliderValue = GuiSlider((Rectangle){ 355, 400, 165, 20 }, "TEST", TextFormat("%2.2f", (float)sliderValue), sliderValue, -50, 100);
sliderBarValue = GuiSliderBar((Rectangle){ 320, 430, 200, 20 }, NULL, TextFormat("%i", (int)sliderBarValue), sliderBarValue, 0, 100); sliderBarValue = GuiSliderBar((Rectangle){ 320, 430, 200, 20 }, NULL, TextFormat("%i", (int)sliderBarValue), sliderBarValue, 0, 100);
progressValue = GuiProgressBar((Rectangle){ 320, 460, 200, 20 }, NULL, NULL, progressValue, 0, 1); progressValue = GuiProgressBar((Rectangle){ 320, 460, 200, 20 }, NULL, NULL, progressValue, 0, 1);
// NOTE: View rectangle could be used to perform some scissor test // NOTE: View rectangle could be used to perform some scissor test
Rectangle view = GuiScrollPanel((Rectangle){ 560, 25, 100, 160 }, (Rectangle){ 560, 25, 200, 400 }, &viewScroll); Rectangle view = GuiScrollPanel((Rectangle){ 560, 25, 100, 160 }, (Rectangle){ 560, 25, 200, 400 }, &viewScroll);
GuiStatusBar((Rectangle){ 0, GetScreenHeight() - 20, GetScreenWidth(), 20 }, "This is a status bar"); GuiStatusBar((Rectangle){ 0, GetScreenHeight() - 20, GetScreenWidth(), 20 }, "This is a status bar");
alphaValue = GuiColorBarAlpha((Rectangle){ 320, 490, 200, 30 }, alphaValue); alphaValue = GuiColorBarAlpha((Rectangle){ 320, 490, 200, 30 }, alphaValue);
if (showMessageBox) if (showMessageBox)
{ {
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f)); DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f));
int result = GuiMessageBox((Rectangle){ GetScreenWidth()/2 - 125, GetScreenHeight()/2 - 50, 250, 100 }, GuiIconText(RICON_EXIT, "Close Window"), "Do you really want to exit?", "Yes;No"); int result = GuiMessageBox((Rectangle){ GetScreenWidth()/2 - 125, GetScreenHeight()/2 - 50, 250, 100 }, GuiIconText(RICON_EXIT, "Close Window"), "Do you really want to exit?", "Yes;No");
if ((result == 0) || (result == 2)) showMessageBox = false; if ((result == 0) || (result == 2)) showMessageBox = false;
else if (result == 1) exitWindow = true; else if (result == 1) exitWindow = true;
} }
if (showTextInputBox) if (showTextInputBox)
{ {
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f)); DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f));
int result = GuiTextInputBox((Rectangle){ GetScreenWidth()/2 - 120, GetScreenHeight()/2 - 60, 240, 140 }, GuiIconText(RICON_FILE_SAVE, "Save file as..."), "Introduce a save file name", "Ok;Cancel", textInput); int result = GuiTextInputBox((Rectangle){ GetScreenWidth()/2 - 120, GetScreenHeight()/2 - 60, 240, 140 }, GuiIconText(RICON_FILE_SAVE, "Save file as..."), "Introduce a save file name", "Ok;Cancel", textInput);
if (result == 1) if (result == 1)
{ {
// TODO: Validate textInput value and save // TODO: Validate textInput value and save
strcpy(textInputFileName, textInput); strcpy(textInputFileName, textInput);
} }
if ((result == 0) || (result == 1) || (result == 2)) if ((result == 0) || (result == 1) || (result == 2))
{ {
showTextInputBox = false; showTextInputBox = false;
strcpy(textInput, "\0"); strcpy(textInput, "\0");
} }
} }
GuiUnlock();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
EndDrawing(); EndDrawing();

View File

@ -3,26 +3,24 @@
* raygui - custom file dialog to load image * raygui - custom file dialog to load image
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 2.6-dev - Windowing/input management and drawing. * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.6-dev - Immediate-mode GUI controls. * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2020 Ramon Santamaria (@raysan5) * Copyright (c) 2016-2021 Ramon Santamaria (@raysan5)
* *
**********************************************************************************************/ **********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_ICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
#undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again #undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again
#define GUI_FILE_DIALOG_IMPLEMENTATION #define GUI_FILE_DIALOG_IMPLEMENTATION
#include "gui_file_dialog.h" #include "gui_file_dialog.h"

View File

@ -18,7 +18,7 @@
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2019-2020 Ramon Santamaria (@raysan5) * Copyright (c) 2019-2021 Ramon Santamaria (@raysan5)
* *
* This software is provided "as-is", without any express or implied warranty. In no event * 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. * will the authors be held liable for any damages arising from the use of this software.
@ -257,7 +257,7 @@ void GuiFileDialog(GuiFileDialogState *state)
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)), 0.85f)); DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)), 0.85f));
state->fileDialogActive = !GuiWindowBox((Rectangle){ state->position.x + 0, state->position.y + 0, winWidth, winHeight }, "#198#LuaJIT | Select File Dialog"); state->fileDialogActive = !GuiWindowBox((Rectangle){ state->position.x + 0, state->position.y + 0, winWidth, winHeight }, "#198# Select File Dialog");
if (GuiButton((Rectangle){ state->position.x + winWidth - 50, state->position.y + 35, 40, 25 }, "< ..")) // || IsKeyReleased(KEY_DPAD_Y)) if (GuiButton((Rectangle){ state->position.x + winWidth - 50, state->position.y + 35, 40, 25 }, "< ..")) // || IsKeyReleased(KEY_DPAD_Y))
{ {

View File

@ -3,25 +3,23 @@
* raygui - image exporter * raygui - image exporter
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 2.1 - Windowing/input management and drawing. * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.0 - Immediate-mode GUI controls. * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2020 Ramon Santamaria (@raysan5) * Copyright (c) 2015-2021 Ramon Santamaria (@raysan5)
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_RICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Program main entry point // Program main entry point
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
@ -102,12 +100,12 @@ int main(int argc, char *argv[0])
if (fileFormatActive == 0) // PNG if (fileFormatActive == 0) // PNG
{ {
if ((GetExtension(fileName) == NULL) || (!IsFileExtension(fileName, ".png"))) strcat(fileName, ".png\0"); // No extension provided if ((GetFileExtension(fileName) == NULL) || (!IsFileExtension(fileName, ".png"))) strcat(fileName, ".png\0"); // No extension provided
ExportImage(image, fileName); ExportImage(image, fileName);
} }
else if (fileFormatActive == 1) // RAW else if (fileFormatActive == 1) // RAW
{ {
if ((GetExtension(fileName) == NULL) || (!IsFileExtension(fileName, ".raw"))) strcat(fileName, ".raw\0"); // No extension provided if ((GetFileExtension(fileName) == NULL) || (!IsFileExtension(fileName, ".raw"))) strcat(fileName, ".raw\0"); // No extension provided
int dataSize = GetPixelDataSize(image.width, image.height, image.format); int dataSize = GetPixelDataSize(image.width, image.height, image.format);
@ -147,7 +145,7 @@ int main(int argc, char *argv[0])
DrawTextureEx(texture, (Vector2){ screenWidth/2 - (float)texture.width*imageScale/2, screenHeight/2 - (float)texture.height*imageScale/2 }, 0.0f, imageScale, WHITE); DrawTextureEx(texture, (Vector2){ screenWidth/2 - (float)texture.width*imageScale/2, screenHeight/2 - (float)texture.height*imageScale/2 }, 0.0f, imageScale, WHITE);
DrawRectangleLinesEx(imageRec, 1, CheckCollisionPointRec(GetMousePosition(), imageRec) ? RED : DARKGRAY); DrawRectangleLinesEx(imageRec, 1, CheckCollisionPointRec(GetMousePosition(), imageRec) ? RED : DARKGRAY);
DrawText(FormatText("SCALE: %.2f%%", imageScale*100.0f), 20, screenHeight - 40, 20, GetColor(GuiGetStyle(DEFAULT, LINE_COLOR))); DrawText(TextFormat("SCALE: %.2f%%", imageScale*100.0f), 20, screenHeight - 40, 20, GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)));
} }
else else
{ {

View File

@ -3,22 +3,21 @@
* raygui - image raw importer * raygui - image raw importer
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 2.1 - Windowing/input management and drawing. * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.0 - Immediate-mode GUI controls. * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2020 Ramon Santamaria (@raysan5) * Copyright (c) 2015-2021 Ramon Santamaria (@raysan5)
* *
**********************************************************************************************/ **********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_RICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
#include <string.h> // Required for: strcpy() #include <string.h> // Required for: strcpy()
@ -128,17 +127,17 @@ int main()
// Select correct format depending on channels and bpp // Select correct format depending on channels and bpp
if (bpp == 8) if (bpp == 8)
{ {
if (channels == 1) format = UNCOMPRESSED_GRAYSCALE; if (channels == 1) format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE;
else if (channels == 2) format = UNCOMPRESSED_GRAY_ALPHA; else if (channels == 2) format = PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA;
else if (channels == 3) format = UNCOMPRESSED_R8G8B8; else if (channels == 3) format = PIXELFORMAT_UNCOMPRESSED_R8G8B8;
else if (channels == 4) format = UNCOMPRESSED_R8G8B8A8; else if (channels == 4) format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
} }
else if (bpp == 32) else if (bpp == 32)
{ {
if (channels == 1) format = UNCOMPRESSED_R32; if (channels == 1) format = PIXELFORMAT_UNCOMPRESSED_R32;
else if (channels == 2) TraceLog(LOG_WARNING, "Channel bit-depth not supported!"); else if (channels == 2) TraceLog(LOG_WARNING, "Channel bit-depth not supported!");
else if (channels == 3) format = UNCOMPRESSED_R32G32B32; else if (channels == 3) format = PIXELFORMAT_UNCOMPRESSED_R32G32B32;
else if (channels == 4) format = UNCOMPRESSED_R32G32B32A32; else if (channels == 4) format = PIXELFORMAT_UNCOMPRESSED_R32G32B32A32;
} }
else if (bpp == 16) TraceLog(LOG_WARNING, "Channel bit-depth not supported!"); else if (bpp == 16) TraceLog(LOG_WARNING, "Channel bit-depth not supported!");
} }
@ -174,7 +173,7 @@ int main()
if (texture.id != 0) if (texture.id != 0)
{ {
DrawTextureEx(texture, (Vector2){ screenWidth/2 - texture.width*imageScale/2, screenHeight/2 - texture.height*imageScale/2 }, 0, imageScale, WHITE); DrawTextureEx(texture, (Vector2){ screenWidth/2 - texture.width*imageScale/2, screenHeight/2 - texture.height*imageScale/2 }, 0, imageScale, WHITE);
DrawText(FormatText("SCALE x%.0f", imageScale), 20, screenHeight - 40, 20, GetColor(GuiGetStyle(DEFAULT, LINE_COLOR))); DrawText(TextFormat("SCALE x%.0f", imageScale), 20, screenHeight - 40, 20, GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)));
} }
else DrawText("drag & drop RAW image file", 320, 180, 10, GetColor(GuiGetStyle(DEFAULT, LINE_COLOR))); else DrawText("drag & drop RAW image file", 320, 180, 10, GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)));
@ -187,7 +186,7 @@ int main()
GuiLabel((Rectangle){ windowOffset.x + 10, windowOffset.y + 30, 65, 20 }, "Import file:"); GuiLabel((Rectangle){ windowOffset.x + 10, windowOffset.y + 30, 65, 20 }, "Import file:");
GuiLabel((Rectangle){ windowOffset.x + 85, windowOffset.y + 30, 75, 20 }, fileName); GuiLabel((Rectangle){ windowOffset.x + 85, windowOffset.y + 30, 75, 20 }, fileName);
GuiLabel((Rectangle){ windowOffset.x + 10, windowOffset.y + 50, 65, 20 }, "File size:"); GuiLabel((Rectangle){ windowOffset.x + 10, windowOffset.y + 50, 65, 20 }, "File size:");
GuiLabel((Rectangle){ windowOffset.x + 85, windowOffset.y + 50, 75, 20 }, FormatText("%i bytes", dataSize)); GuiLabel((Rectangle){ windowOffset.x + 85, windowOffset.y + 50, 75, 20 }, TextFormat("%i bytes", dataSize));
GuiGroupBox((Rectangle){ windowOffset.x + 10, windowOffset.y + 85, 180, 80 }, "Resolution"); GuiGroupBox((Rectangle){ windowOffset.x + 10, windowOffset.y + 85, 180, 80 }, "Resolution");
GuiLabel((Rectangle){ windowOffset.x + 20, windowOffset.y + 100, 33, 25 }, "Width:"); GuiLabel((Rectangle){ windowOffset.x + 20, windowOffset.y + 100, 33, 25 }, "Width:");
if (GuiValueBox((Rectangle){ windowOffset.x + 60, windowOffset.y + 100, 80, 25 }, NULL, &widthValue, 0, 8192, widthEditMode)) widthEditMode = !widthEditMode; if (GuiValueBox((Rectangle){ windowOffset.x + 60, windowOffset.y + 100, 80, 25 }, NULL, &widthValue, 0, 8192, widthEditMode)) widthEditMode = !widthEditMode;

View File

@ -3,15 +3,15 @@
* raygui - portable window * raygui - portable window
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 2.1 - Windowing/input management and drawing. * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.0 - Immediate-mode GUI controls. * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2020 Ramon Santamaria (@raysan5) * Copyright (c) 2016-2021 Ramon Santamaria (@raysan5)
* *
**********************************************************************************************/ **********************************************************************************************/
@ -27,8 +27,8 @@ int main()
{ {
// Initialization // Initialization
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
int screenWidth = 800; const int screenWidth = 800;
int screenHeight = 600; const int screenHeight = 600;
SetConfigFlags(FLAG_WINDOW_UNDECORATED); SetConfigFlags(FLAG_WINDOW_UNDECORATED);
InitWindow(screenWidth, screenHeight, "raygui - portable window"); InitWindow(screenWidth, screenHeight, "raygui - portable window");
@ -79,9 +79,9 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
exitWindow = GuiWindowBox((Rectangle){ 0, 0, screenWidth, screenHeight }, "PORTABLE WINDOW"); exitWindow = GuiWindowBox((Rectangle){ 0, 0, screenWidth, screenHeight }, "#198# PORTABLE WINDOW");
DrawText(FormatText("Mouse Position: [ %.0f, %.0f ]", mousePosition.x, mousePosition.y), 10, 40, 10, DARKGRAY); DrawText(TextFormat("Mouse Position: [ %.0f, %.0f ]", mousePosition.x, mousePosition.y), 10, 40, 10, DARKGRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View File

@ -398,7 +398,7 @@ double GuiDMSpinner(Rectangle bounds, double value, double minValue, double maxV
GuiSetStyle(BUTTON, BORDER_WIDTH, GuiGetStyle(SPINNER, BORDER_WIDTH)); GuiSetStyle(BUTTON, BORDER_WIDTH, GuiGetStyle(SPINNER, BORDER_WIDTH));
GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER); GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
#if defined(RAYGUI_SUPPORT_ICONS) #if defined(RAYGUI_SUPPORT_RICONS)
if (GuiButton(leftButtonBound, GuiIconText(RICON_ARROW_LEFT_FILL, NULL))) value -= step; if (GuiButton(leftButtonBound, GuiIconText(RICON_ARROW_LEFT_FILL, NULL))) value -= step;
if (GuiButton(rightButtonBound, GuiIconText(RICON_ARROW_RIGHT_FILL, NULL))) value += step; if (GuiButton(rightButtonBound, GuiIconText(RICON_ARROW_RIGHT_FILL, NULL))) value += step;
#else #else
@ -417,7 +417,7 @@ double GuiDMSpinner(Rectangle bounds, double value, double minValue, double maxV
void GuiDMPropertyList(Rectangle bounds, GuiDMProperty* props, int count, int* focus, int* scrollIndex) { void GuiDMPropertyList(Rectangle bounds, GuiDMProperty* props, int count, int* focus, int* scrollIndex) {
#ifdef RAYGUI_SUPPORT_ICONS #ifdef RAYGUI_SUPPORT_RICONS
#define PROPERTY_COLLAPSED_ICON "#120#" #define PROPERTY_COLLAPSED_ICON "#120#"
#define PROPERTY_EXPANDED_ICON "#121#" #define PROPERTY_EXPANDED_ICON "#121#"
#else #else

View File

@ -1,24 +1,23 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raygui - a custom property list control * raygui - custom property list control
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 3.0 * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.7 * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2020 Vlad Adrian (@Demizdor - https://github.com/Demizdor) * Copyright (c) 2020-2021 Vlad Adrian (@Demizdor) and Ramon Santamaria (@raysan5)
* *
**********************************************************************************************/ **********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_ICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
#undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again #undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again
@ -26,8 +25,6 @@
#define GUI_PROPERTY_LIST_IMPLEMENTATION #define GUI_PROPERTY_LIST_IMPLEMENTATION
#include "dm_property_list.h" #include "dm_property_list.h"
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 450
#define SIZEOF(A) (sizeof(A)/sizeof(A[0])) #define SIZEOF(A) (sizeof(A)/sizeof(A[0]))
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
@ -37,7 +34,11 @@ int main()
{ {
// Initialization // Initialization
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raygui - property list");
GuiDMProperty prop[] = { GuiDMProperty prop[] = {
PBOOL("Bool", 0, true), PBOOL("Bool", 0, true),
PSECTION("#102#SECTION", 0, 2), PSECTION("#102#SECTION", 0, 2),
@ -52,17 +53,17 @@ int main()
PVEC4("Vec4", 0, 12, 13, 14, 15), PVEC4("Vec4", 0, 12, 13, 14, 15),
PCOLOR("Color", 0, 0, 255, 0, 255), PCOLOR("Color", 0, 0, 255, 0, 255),
}; };
int focus = 0, scroll = 0; // needed by GuiDMPropertyList()
InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "raygui - property list");
SetTargetFPS(60);
int focus = 0, scroll = 0; // Needed by GuiDMPropertyList()
GuiLoadStyleDefault(); GuiLoadStyleDefault();
// adjust the default raygui style a bit
// Tweak the default raygui style a bit
GuiSetStyle(LISTVIEW, LIST_ITEMS_HEIGHT, 24); GuiSetStyle(LISTVIEW, LIST_ITEMS_HEIGHT, 24);
GuiSetStyle(LISTVIEW, SCROLLBAR_WIDTH, 12); GuiSetStyle(LISTVIEW, SCROLLBAR_WIDTH, 12);
//--------------------------------------------------------------------------------------
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop // Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key while (!WindowShouldClose()) // Detect window close button or ESC key
@ -70,20 +71,28 @@ int main()
// Draw // Draw
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
BeginDrawing(); BeginDrawing();
ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)));
GuiGrid((Rectangle){0,0,SCREEN_WIDTH,SCREEN_HEIGHT},20.0f, 2); // draw a fancy grid GuiGrid((Rectangle){0, 0, screenWidth, screenHeight},20.0f, 2); // Draw a fancy grid
GuiDMPropertyList((Rectangle){(SCREEN_WIDTH - 180)/2, (SCREEN_HEIGHT - 280)/2, 180, 280}, prop, SIZEOF(prop), &focus, &scroll); GuiDMPropertyList((Rectangle){(screenWidth - 180)/2, (screenHeight - 280)/2, 180, 280}, prop, SIZEOF(prop), &focus, &scroll);
if(prop[0].value.vbool) if (prop[0].value.vbool >= 1)
{
DrawText(TextFormat("FOCUS:%i | SCROLL:%i | FPS:%i", focus, scroll, GetFPS()), prop[8].value.v2.x, prop[8].value.v2.y, 20, prop[11].value.vcolor); DrawText(TextFormat("FOCUS:%i | SCROLL:%i | FPS:%i", focus, scroll, GetFPS()), prop[8].value.v2.x, prop[8].value.v2.y, 20, prop[11].value.vcolor);
EndDrawing(); }
//----------------------------------------------------------------------------------
EndDrawing();
//----------------------------------------------------------------------------------
} }
// De-Initialization
//--------------------------------------------------------------------------------------
GuiDMSaveProperties("test.props", prop, SIZEOF(prop)); // Save properties to `test.props` file at exit GuiDMSaveProperties("test.props", prop, SIZEOF(prop)); // Save properties to `test.props` file at exit
CloseWindow(); // Close window and OpenGL context
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0; return 0;
} }

View File

@ -0,0 +1,27 @@
#
# Property types:
# b <name> <flags> <value> // Bool
# i <name> <flags> <value> <min> <max> <step> // Int
# f <name> <flags> <value> <min> <max> <step> <precision> // Float
# t <name> <flags> <value> <edit_length> // Text
# l <name> <flags> <value> <active> // Select
# g <name> <flags> <value> // Section (Group)
# v2 <name> <flags> <x> <y> // Vector 2D
# v3 <name> <flags> <x> <y> <z> // Vector 3D
# v4 <name> <flags> <x> <y> <z> <w> // Vector 4D
# r <name> <flags> <x> <y> <width> <height> // Rectangle
# c <name> <flags> <r> <g> <b> <a> // Color
#
b Bool 0 1
g #102#SECTION 0 2
i Int 0 123 0 0 1
f Float 0 0.990000 0.000000 0.000000 1.000000 3
t Text 1 Hello! 30
l Select 0 ONE;TWO;THREE;FOUR 3
i Int Range 0 32 0 100 1
r Rect 1 0 0 100 200
v2 Vec2 1 20.000000 20.000000
v3 Vec3 1 12.000000 13.000000 14.000000
v4 Vec4 1 12.000000 13.000000 14.000000 15.000000
c Color 1 94 68 197 160

View File

@ -6,18 +6,18 @@
* - GuiScrollPanel() * - GuiScrollPanel()
* *
* DEPENDENCIES: * DEPENDENCIES:
* raylib 2.4 - Windowing/input management and drawing. * raylib 4.0 - Windowing/input management and drawing.
* raygui 2.0 - Immediate-mode GUI controls. * raygui 3.0 - Immediate-mode GUI controls.
* *
* COMPILATION (Windows - MinGW): * COMPILATION (Windows - MinGW):
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* COMPILATION (Linux - gcc): * COMPILATION (Linux - gcc):
* gcc -o $(NAME_PART) $(FILE_NAME) -I../../src -lraylib -std=c99 * gcc -o $(NAME_PART) $(FILE_NAME) -I../../src -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2019 Vlad Adrian (@Demizdor) and Ramon Santamaria (@raysan5) * Copyright (c) 2019-2021 Vlad Adrian (@Demizdor) and Ramon Santamaria (@raysan5)
* *
**********************************************************************************************/ **********************************************************************************************/
@ -78,8 +78,8 @@ int main()
showContentArea = GuiCheckBox((Rectangle){ 565, 80, 20, 20 }, "SHOW CONTENT AREA", showContentArea); showContentArea = GuiCheckBox((Rectangle){ 565, 80, 20, 20 }, "SHOW CONTENT AREA", showContentArea);
panelContentRec.width = GuiSliderBar((Rectangle){ 590, 385, 145, 15}, "WIDTH", TextFormat("%i", (int)panelContentRec.width), 1, 600, true); panelContentRec.width = GuiSliderBar((Rectangle){ 590, 385, 145, 15}, "WIDTH", TextFormat("%i", (int)panelContentRec.width), panelContentRec.width, 1, 600);
panelContentRec.height = GuiSliderBar((Rectangle){ 590, 410, 145, 15 }, "HEIGHT", TextFormat("%i", (int)panelContentRec.height), 1, 400, true); panelContentRec.height = GuiSliderBar((Rectangle){ 590, 410, 145, 15 }, "HEIGHT", TextFormat("%i", (int)panelContentRec.height), panelContentRec.height, 1, 400);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View File

@ -166,7 +166,7 @@ static void DrawTextEx(Font font, const char *text, Vector2 position, float font
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
// GuiLoadStyle() required functions // GuiLoadStyle() required functions
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
static Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount) static Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount)
{ {
Font font = { 0 }; Font font = { 0 };

View File

@ -13,7 +13,7 @@
* gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99 * gcc -o $(NAME_PART).exe $(FILE_NAME) -I../../src -lraylib -lopengl32 -lgdi32 -std=c99
* *
* COMPILATION (Linux - gcc): * COMPILATION (Linux - gcc):
* gcc -o $(NAME_PART) $(FILE_NAME) -I../../src -lraylib -std=c99 * gcc -o $(NAME_PART) $(FILE_NAME) -I../../src -lraylib -std=c99
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
@ -24,13 +24,12 @@
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_RICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
#undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again #undef RAYGUI_IMPLEMENTATION // Avoid including raygui implementation again
#define GUI_TEXTBOX_EXTENDED_IMPLEMENTATION #define GUI_TEXTBOX_EXTENDED_IMPLEMENTATION
#include "../../src/gui_textbox_extended.h" #include "../../src/extras/gui_textbox_extended.h"
#include <limits.h> #include <limits.h>
@ -87,9 +86,9 @@ int main(int argc, char **argv)
InitWindow(screenWidth, screenHeight, "raygui - gui textboxBounds extended demo"); InitWindow(screenWidth, screenHeight, "raygui - gui textboxBounds extended demo");
// Generate a checked checked used by the color buttons // Generate a checked checked used by the color buttons
Image img = GenImageChecked(26, 26, 5, 5, RAYWHITE, DARKGRAY); Image img = GenImageChecked(26, 26, 5, 5, RAYWHITE, DARKGRAY);
checked = LoadTextureFromImage(img); checked = LoadTextureFromImage(img);
UnloadImage(img); UnloadImage(img);
Font font = { 0 }; Font font = { 0 };
int fontSize = GuiGetStyle(DEFAULT, TEXT_SIZE); int fontSize = GuiGetStyle(DEFAULT, TEXT_SIZE);
@ -185,8 +184,8 @@ int main(int argc, char **argv)
// Draw // Draw
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
BeginDrawing(); BeginDrawing();
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
// Draw textboxes extended // Draw textboxes extended
@ -213,7 +212,7 @@ int main(int argc, char **argv)
GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER); GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
// Draw hexadecimal values viewer // Draw hexadecimal values viewer
DrawTextRecEx(guiFont, hex, (Rectangle){ 20, 95, 760, 205 }, 20, 1, true, BLACK, startIdx*3, len*3, colorFG, colorBG); DrawTextBoxedSelectable(guiFont, hex, (Rectangle){ 20, 95, 760, 205 }, 20, 1, true, BLACK, startIdx*3, len*3, colorFG, colorBG);
// Draw right-mouse-button-click menu and logic // Draw right-mouse-button-click menu and logic
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
@ -288,7 +287,7 @@ int main(int argc, char **argv)
*/ */
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
} }

View File

@ -21,10 +21,8 @@
#include "raylib.h" #include "raylib.h"
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_ICONS
#include "../../src/raygui.h" #include "../../src/raygui.h"
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Defines and Macros // Defines and Macros
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -94,8 +92,8 @@ int main(int argc, char **argv)
// Draw // Draw
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
BeginDrawing(); BeginDrawing();
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
// Draw textboxes extended // Draw textboxes extended
@ -104,7 +102,7 @@ int main(int argc, char **argv)
if (GuiTextEditor((Rectangle){ 420, 20, 360, 410 }, text02, strlen(text02), textEditor02EditMode)) textEditor02EditMode = !textEditor02EditMode; if (GuiTextEditor((Rectangle){ 420, 20, 360, 410 }, text02, strlen(text02), textEditor02EditMode)) textEditor02EditMode = !textEditor02EditMode;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
} }
@ -131,7 +129,7 @@ bool GuiTextEditor(Rectangle bounds, char *text, int textSize, bool editMode)
bool textWrap = true; // TODO: Word-Wrap vs Char-Wrap -> textWrapMode { NO_WRAP_LOCK, NO_WRAP_OVERFLOW, CHAR_WRAP, WORD_WRAP } bool textWrap = true; // TODO: Word-Wrap vs Char-Wrap -> textWrapMode { NO_WRAP_LOCK, NO_WRAP_OVERFLOW, CHAR_WRAP, WORD_WRAP }
// WARNING: First string full traversal // WARNING: First string full traversal
int codepointCount = GetCodepointsCount(text); int codepointCount = GetCodepointCount(text);
int textLen = strlen(text); // Text length in bytes int textLen = strlen(text); // Text length in bytes
@ -211,11 +209,11 @@ bool GuiTextEditor(Rectangle bounds, char *text, int textSize, bool editMode)
{ {
// Get next codepoint from byte string and glyph index in font // Get next codepoint from byte string and glyph index in font
int codepointByteCount = 0; int codepointByteCount = 0;
int codepoint = GetNextCodepoint(&text[i], &codepointByteCount); int codepoint = GetCodepoint(&text[i], &codepointByteCount);
int index = GetGlyphIndex(font, codepoint); int index = GetGlyphIndex(font, codepoint);
Rectangle rec = { bounds.x + textOffsetX + font.chars[index].offsetX*scaleFactor, Rectangle rec = { bounds.x + textOffsetX + font.glyphs[index].offsetX*scaleFactor,
bounds.y + textOffsetY + font.chars[index].offsetY*scaleFactor, bounds.y + textOffsetY + font.glyphs[index].offsetY*scaleFactor,
font.recs[index].width*scaleFactor, font.recs[index].height*scaleFactor }; font.recs[index].width*scaleFactor, font.recs[index].height*scaleFactor };
// Automatic line break to wrap text inside box // Automatic line break to wrap text inside box
@ -225,8 +223,8 @@ bool GuiTextEditor(Rectangle bounds, char *text, int textSize, bool editMode)
textOffsetX = 0.0f; textOffsetX = 0.0f;
// Recalculate drawing rectangle position // Recalculate drawing rectangle position
rec = (Rectangle){ bounds.x + textOffsetX + font.chars[index].offsetX*scaleFactor, rec = (Rectangle){ bounds.x + textOffsetX + font.glyphs[index].offsetX*scaleFactor,
bounds.y + textOffsetY + font.chars[index].offsetY*scaleFactor, bounds.y + textOffsetY + font.glyphs[index].offsetY*scaleFactor,
font.recs[index].width*scaleFactor, font.recs[index].height*scaleFactor }; font.recs[index].width*scaleFactor, font.recs[index].height*scaleFactor };
} }
@ -280,8 +278,8 @@ bool GuiTextEditor(Rectangle bounds, char *text, int textSize, bool editMode)
// TODO: Consider spacing when drawing selected characters background // TODO: Consider spacing when drawing selected characters background
if (editMode && (selectStartCp != -1) && ((cp >= selectStartCp) && (cp <= (selectStartCp + selectLengthCp)))) DrawRectangleRec(rec, MAROON); if (editMode && (selectStartCp != -1) && ((cp >= selectStartCp) && (cp <= (selectStartCp + selectLengthCp)))) DrawRectangleRec(rec, MAROON);
if (font.chars[index].advanceX == 0) textOffsetX += ((float)font.recs[index].width*scaleFactor + GuiGetStyle(DEFAULT, TEXT_SPACING)); if (font.glyphs[index].advanceX == 0) textOffsetX += ((float)font.recs[index].width*scaleFactor + GuiGetStyle(DEFAULT, TEXT_SPACING));
else textOffsetX += ((float)font.chars[index].advanceX*scaleFactor + GuiGetStyle(DEFAULT, TEXT_SPACING)); else textOffsetX += ((float)font.glyphs[index].advanceX*scaleFactor + GuiGetStyle(DEFAULT, TEXT_SPACING));
i += (codepointByteCount - 1); // Move text bytes counter to next codepoint i += (codepointByteCount - 1); // Move text bytes counter to next codepoint
cp++; cp++;

BIN
images/rguiicons_v100.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/rguilayout_v220.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.27130.2024 VisualStudioVersion = 16.0.29411.108
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "controls_test_suite", "examples\controls_test_suite.vcxproj", "{0981CA98-E4A5-4DF1-987F-A41D09131EFC}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "controls_test_suite", "examples\controls_test_suite.vcxproj", "{0981CA98-E4A5-4DF1-987F-A41D09131EFC}"
EndProject EndProject

View File

@ -160,16 +160,16 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\..\raylib\src\raudio.c" /> <ClCompile Include="..\..\..\..\raylib\src\raudio.c" />
<ClCompile Include="..\..\..\..\raylib\src\core.c" /> <ClCompile Include="..\..\..\..\raylib\src\rcore.c" />
<ClCompile Include="..\..\..\..\raylib\src\models.c" /> <ClCompile Include="..\..\..\..\raylib\src\rmodels.c" />
<ClCompile Include="..\..\..\..\raylib\src\rglfw.c" /> <ClCompile Include="..\..\..\..\raylib\src\rglfw.c" />
<ClCompile Include="..\..\..\..\raylib\src\shapes.c" /> <ClCompile Include="..\..\..\..\raylib\src\rshapes.c" />
<ClCompile Include="..\..\..\..\raylib\src\text.c" /> <ClCompile Include="..\..\..\..\raylib\src\rtext.c" />
<ClCompile Include="..\..\..\..\raylib\src\textures.c" /> <ClCompile Include="..\..\..\..\raylib\src\rtextures.c" />
<ClCompile Include="..\..\..\..\raylib\src\utils.c" /> <ClCompile Include="..\..\..\..\raylib\src\utils.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\..\raylib\src\camera.h" /> <ClInclude Include="..\..\..\..\raylib\src\rcamera.h" />
<ClInclude Include="..\..\..\..\raylib\src\external\glad.h" /> <ClInclude Include="..\..\..\..\raylib\src\external\glad.h" />
<ClInclude Include="..\..\..\..\raylib\src\external\jar_mod.h" /> <ClInclude Include="..\..\..\..\raylib\src\external\jar_mod.h" />
<ClInclude Include="..\..\..\..\raylib\src\external\jar_xm.h" /> <ClInclude Include="..\..\..\..\raylib\src\external\jar_xm.h" />
@ -180,7 +180,7 @@
<ClInclude Include="..\..\..\..\raylib\src\external\stb_rect_pack.h" /> <ClInclude Include="..\..\..\..\raylib\src\external\stb_rect_pack.h" />
<ClInclude Include="..\..\..\..\raylib\src\external\stb_truetype.h" /> <ClInclude Include="..\..\..\..\raylib\src\external\stb_truetype.h" />
<ClInclude Include="..\..\..\..\raylib\src\external\stb_vorbis.h" /> <ClInclude Include="..\..\..\..\raylib\src\external\stb_vorbis.h" />
<ClInclude Include="..\..\..\..\raylib\\src\gestures.h" /> <ClInclude Include="..\..\..\..\raylib\src\rgestures.h" />
<ClInclude Include="..\..\..\..\raylib\src\raylib.h" /> <ClInclude Include="..\..\..\..\raylib\src\raylib.h" />
<ClInclude Include="..\..\..\..\raylib\src\raymath.h" /> <ClInclude Include="..\..\..\..\raylib\src\raymath.h" />
<ClInclude Include="..\..\..\..\raylib\src\rlgl.h" /> <ClInclude Include="..\..\..\..\raylib\src\rlgl.h" />

View File

@ -31,7 +31,6 @@
#ifndef GUI_TEXTBOX_EXTENDED_H #ifndef GUI_TEXTBOX_EXTENDED_H
#define GUI_TEXTBOX_EXTENDED_H #define GUI_TEXTBOX_EXTENDED_H
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Defines and Macros // Defines and Macros
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -56,27 +55,31 @@ extern "C" { // Prevents name mangling of functions
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Module Functions Declaration // Module Functions Declaration
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
RAYGUIDEF void GuiTextBoxSetActive(Rectangle bounds); // Sets the active textbox RAYGUIAPI void GuiTextBoxSetActive(Rectangle bounds); // Sets the active textbox
RAYGUIDEF Rectangle GuiTextBoxGetActive(void); // Get bounds of active textbox RAYGUIAPI Rectangle GuiTextBoxGetActive(void); // Get bounds of active textbox
RAYGUIDEF void GuiTextBoxSetCursor(int cursor); // Set cursor position of active textbox RAYGUIAPI void GuiTextBoxSetCursor(int cursor); // Set cursor position of active textbox
RAYGUIDEF int GuiTextBoxGetCursor(void); // Get cursor position of active textbox RAYGUIAPI int GuiTextBoxGetCursor(void); // Get cursor position of active textbox
RAYGUIDEF void GuiTextBoxSetSelection(int start, int length); // Set selection of active textbox RAYGUIAPI void GuiTextBoxSetSelection(int start, int length); // Set selection of active textbox
RAYGUIDEF Vector2 GuiTextBoxGetSelection(void); // Get selection of active textbox (x - selection start y - selection length) RAYGUIAPI Vector2 GuiTextBoxGetSelection(void); // Get selection of active textbox (x - selection start y - selection length)
RAYGUIDEF bool GuiTextBoxIsActive(Rectangle bounds); // Returns true if a textbox control with specified `bounds` is the active textbox RAYGUIAPI bool GuiTextBoxIsActive(Rectangle bounds); // Returns true if a textbox control with specified `bounds` is the active textbox
RAYGUIDEF GuiTextBoxState GuiTextBoxGetState(void); // Get state for the active textbox RAYGUIAPI GuiTextBoxState GuiTextBoxGetState(void); // Get state for the active textbox
RAYGUIDEF void GuiTextBoxSetState(GuiTextBoxState state); // Set state for the active textbox (state must be valid else things will break) RAYGUIAPI void GuiTextBoxSetState(GuiTextBoxState state); // Set state for the active textbox (state must be valid else things will break)
RAYGUIDEF void GuiTextBoxSelectAll(const char *text); // Select all characters in the active textbox (same as pressing `CTRL` + `A`) RAYGUIAPI void GuiTextBoxSelectAll(const char *text); // Select all characters in the active textbox (same as pressing `CTRL` + `A`)
RAYGUIDEF void GuiTextBoxCopy(const char *text); // Copy selected text to clipboard from the active textbox (same as pressing `CTRL` + `C`) RAYGUIAPI void GuiTextBoxCopy(const char *text); // Copy selected text to clipboard from the active textbox (same as pressing `CTRL` + `C`)
RAYGUIDEF void GuiTextBoxPaste(char *text, int textSize); // Paste text from clipboard into the textbox (same as pressing `CTRL` + `V`) RAYGUIAPI void GuiTextBoxPaste(char *text, int textSize); // Paste text from clipboard into the textbox (same as pressing `CTRL` + `V`)
RAYGUIDEF void GuiTextBoxCut(char *text); // Cut selected text in the active textbox and copy it to clipboard (same as pressing `CTRL` + `X`) RAYGUIAPI void GuiTextBoxCut(char *text); // Cut selected text in the active textbox and copy it to clipboard (same as pressing `CTRL` + `X`)
RAYGUIDEF int GuiTextBoxDelete(char *text, int length, bool before); // Deletes a character or selection before from the active textbox (depending on `before`). Returns bytes deleted. RAYGUIAPI int GuiTextBoxDelete(char *text, int length, bool before); // Deletes a character or selection before from the active textbox (depending on `before`). Returns bytes deleted.
RAYGUIDEF int GuiTextBoxGetByteIndex(const char *text, int start, int from, int to); // Get the byte index for a character starting at position `from` with index `start` until position `to`. RAYGUIAPI int GuiTextBoxGetByteIndex(const char *text, int start, int from, int to); // Get the byte index for a character starting at position `from` with index `start` until position `to`.
RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool editMode); RAYGUIAPI bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool editMode);
RAYGUIAPI static void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
RAYGUIAPI static void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
RAYGUIAPI static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Alias for above
#ifdef __cplusplus #ifdef __cplusplus
} }
@ -96,6 +99,146 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
#include "raygui.h" #include "raygui.h"
#endif #endif
// Draw text using font inside rectangle limits
static void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
{
DrawTextRecEx(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE);
}
// Draw text using font inside rectangle limits with support for text selection
static void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
{
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
float textOffsetY = 0; // Offset between lines (on line break '\n')
float textOffsetX = 0.0f; // Offset X to next character to draw
float scaleFactor = fontSize/(float)font.baseSize; // Character rectangle scaling factor
// Word/character wrapping mechanism variables
enum { MEASURE_STATE = 0, DRAW_STATE = 1 };
int state = wordWrap? MEASURE_STATE : DRAW_STATE;
int startLine = -1; // Index where to begin drawing (where a line begins)
int endLine = -1; // Index where to stop drawing (where a line ends)
int lastk = -1; // Holds last value of the character position
for (int i = 0, k = 0; i < length; i++, k++)
{
// Get next codepoint from byte string and glyph index in font
int codepointByteCount = 0;
int codepoint = GetCodepoint(&text[i], &codepointByteCount);
int index = GetGlyphIndex(font, codepoint);
// NOTE: Normally we exit the decoding sequence as soon as a bad byte is found (and return 0x3f)
// but we need to draw all of the bad bytes using the '?' symbol moving one byte
if (codepoint == 0x3f) codepointByteCount = 1;
i += (codepointByteCount - 1);
float glyphWidth = 0;
if (codepoint != '\n')
{
glyphWidth = (font.glyphs[index].advanceX == 0) ? font.recs[index].width*scaleFactor : font.glyphs[index].advanceX*scaleFactor;
if (i + 1 < length) glyphWidth = glyphWidth + spacing;
}
// NOTE: When wordWrap is ON we first measure how much of the text we can draw before going outside of the rec container
// We store this info in startLine and endLine, then we change states, draw the text between those two variables
// and change states again and again recursively until the end of the text (or until we get outside of the container).
// When wordWrap is OFF we don't need the measure state so we go to the drawing state immediately
// and begin drawing on the next line before we can get outside the container.
if (state == MEASURE_STATE)
{
// TODO: There are multiple types of spaces in UNICODE, maybe it's a good idea to add support for more
// Ref: http://jkorpela.fi/chars/spaces.html
if ((codepoint == ' ') || (codepoint == '\t') || (codepoint == '\n')) endLine = i;
if ((textOffsetX + glyphWidth) > rec.width)
{
endLine = (endLine < 1)? i : endLine;
if (i == endLine) endLine -= codepointByteCount;
if ((startLine + codepointByteCount) == endLine) endLine = (i - codepointByteCount);
state = !state;
}
else if ((i + 1) == length)
{
endLine = i;
state = !state;
}
else if (codepoint == '\n') state = !state;
if (state == DRAW_STATE)
{
textOffsetX = 0;
i = startLine;
glyphWidth = 0;
// Save character position when we switch states
int tmp = lastk;
lastk = k - 1;
k = tmp;
}
}
else
{
if (codepoint == '\n')
{
if (!wordWrap)
{
textOffsetY += (font.baseSize + font.baseSize/2)*scaleFactor;
textOffsetX = 0;
}
}
else
{
if (!wordWrap && ((textOffsetX + glyphWidth) > rec.width))
{
textOffsetY += (font.baseSize + font.baseSize/2)*scaleFactor;
textOffsetX = 0;
}
// When text overflows rectangle height limit, just stop drawing
if ((textOffsetY + font.baseSize*scaleFactor) > rec.height) break;
// Draw selection background
bool isGlyphSelected = false;
if ((selectStart >= 0) && (k >= selectStart) && (k < (selectStart + selectLength)))
{
DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint);
isGlyphSelected = true;
}
// Draw current character glyph
if ((codepoint != ' ') && (codepoint != '\t'))
{
DrawTextCodepoint(font, codepoint, (Vector2){ rec.x + textOffsetX, rec.y + textOffsetY }, fontSize, isGlyphSelected? selectTint : tint);
}
}
if (wordWrap && (i == endLine))
{
textOffsetY += (font.baseSize + font.baseSize/2)*scaleFactor;
textOffsetX = 0;
startLine = endLine;
endLine = -1;
glyphWidth = 0;
selectStart += lastk - k;
k = lastk;
state = !state;
}
}
textOffsetX += glyphWidth;
}
}
static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) {
DrawTextRecEx(font, text, rec, fontSize, spacing, wordWrap, tint, selectStart, selectLength, selectTint, selectBackTint);
}
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Defines and Macros // Defines and Macros
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -128,7 +271,7 @@ static GuiTextBoxState guiTextBoxState = { // Keeps state of the active tex
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
static int GetPrevCodepoint(const char *text, const char *start, int *prev); static int GetPrevCodepoint(const char *text, const char *start, int *prev);
static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *pos, int mode); static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *pos, int mode);
static int GuiMeasureTextBoxRev(const char *text, int length, Rectangle rec, int *pos); // Highly synchronized with calculations in DrawTextRecEx() static int GuiMeasureTextBoxRev(const char *text, int length, Rectangle rec, int *pos); // Highly synchronized with calculations in DrawTextBoxedSelectable()
static inline int GuiTextBoxGetCursorCoordinates(const char *text, int length, Rectangle rec, int pos); // Calculate cursor coordinates based on the cursor position `pos` inside the `text`. static inline int GuiTextBoxGetCursorCoordinates(const char *text, int length, Rectangle rec, int pos); // Calculate cursor coordinates based on the cursor position `pos` inside the `text`.
static inline int GuiTextBoxGetCursorFromMouse(const char *text, int length, Rectangle rec, int *pos); // Calculate cursor position in textbox based on mouse coordinates. static inline int GuiTextBoxGetCursorFromMouse(const char *text, int length, Rectangle rec, int *pos); // Calculate cursor position in textbox based on mouse coordinates.
@ -145,27 +288,27 @@ static int EncodeCodepoint(unsigned int c, char out[5]);
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Sets the active textbox (reseting state of the previous active textbox) // Sets the active textbox (reseting state of the previous active textbox)
RAYGUIDEF void GuiTextBoxSetActive(Rectangle bounds) RAYGUIAPI void GuiTextBoxSetActive(Rectangle bounds)
{ {
guiTextBoxActive = bounds; guiTextBoxActive = bounds;
guiTextBoxState = (GuiTextBoxState){ .cursor = -1, .start = 0, .index = 0, .select = -1 }; guiTextBoxState = (GuiTextBoxState){ .cursor = -1, .start = 0, .index = 0, .select = -1 };
} }
// Gets bounds of active textbox // Gets bounds of active textbox
RAYGUIDEF Rectangle GuiTextBoxGetActive(void) { return guiTextBoxActive; } RAYGUIAPI Rectangle GuiTextBoxGetActive(void) { return guiTextBoxActive; }
// Set cursor position of active textbox // Set cursor position of active textbox
RAYGUIDEF void GuiTextBoxSetCursor(int cursor) RAYGUIAPI void GuiTextBoxSetCursor(int cursor)
{ {
guiTextBoxState.cursor = (cursor < 0) ? -1 : cursor; guiTextBoxState.cursor = (cursor < 0) ? -1 : cursor;
guiTextBoxState.start = -1; // Mark this to be recalculated guiTextBoxState.start = -1; // Mark this to be recalculated
} }
// Get cursor position of active textbox // Get cursor position of active textbox
RAYGUIDEF int GuiTextBoxGetCursor(void) { return guiTextBoxState.cursor; } RAYGUIAPI int GuiTextBoxGetCursor(void) { return guiTextBoxState.cursor; }
// Set selection of active textbox // Set selection of active textbox
RAYGUIDEF void GuiTextBoxSetSelection(int start, int length) RAYGUIAPI void GuiTextBoxSetSelection(int start, int length)
{ {
if (start < 0) start = 0; if (start < 0) start = 0;
if (length < 0) length = 0; if (length < 0) length = 0;
@ -175,36 +318,36 @@ RAYGUIDEF void GuiTextBoxSetSelection(int start, int length)
} }
// Get selection of active textbox // Get selection of active textbox
RAYGUIDEF Vector2 GuiTextBoxGetSelection(void) RAYGUIAPI Vector2 GuiTextBoxGetSelection(void)
{ {
if (guiTextBoxState.select == -1 || guiTextBoxState.select == guiTextBoxState.cursor) return RAYGUI_CLITERAL(Vector2){ 0 }; if (guiTextBoxState.select == -1 || guiTextBoxState.select == guiTextBoxState.cursor) return RAYGUI_CLITERAL(Vector2){ 0 };
else if (guiTextBoxState.cursor > guiTextBoxState.select) return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.select, guiTextBoxState.cursor - guiTextBoxState.select }; else if (guiTextBoxState.cursor > guiTextBoxState.select) return RAYGUI_CLITERAL(Vector2){ (float)guiTextBoxState.select, (float)guiTextBoxState.cursor - guiTextBoxState.select };
return RAYGUI_CLITERAL(Vector2){ guiTextBoxState.cursor, guiTextBoxState.select - guiTextBoxState.cursor }; return RAYGUI_CLITERAL(Vector2){ (float)guiTextBoxState.cursor, (float)guiTextBoxState.select - guiTextBoxState.cursor };
} }
// Returns true if a textbox control with specified `bounds` is the active textbox // Returns true if a textbox control with specified `bounds` is the active textbox
RAYGUIDEF bool GuiTextBoxIsActive(Rectangle bounds) RAYGUIAPI bool GuiTextBoxIsActive(Rectangle bounds)
{ {
return (bounds.x == guiTextBoxActive.x && bounds.y == guiTextBoxActive.y && return (bounds.x == guiTextBoxActive.x && bounds.y == guiTextBoxActive.y &&
bounds.width == guiTextBoxActive.width && bounds.height == guiTextBoxActive.height); bounds.width == guiTextBoxActive.width && bounds.height == guiTextBoxActive.height);
} }
RAYGUIDEF GuiTextBoxState GuiTextBoxGetState(void) { return guiTextBoxState; } RAYGUIAPI GuiTextBoxState GuiTextBoxGetState(void) { return guiTextBoxState; }
RAYGUIDEF void GuiTextBoxSetState(GuiTextBoxState state) RAYGUIAPI void GuiTextBoxSetState(GuiTextBoxState state)
{ {
// NOTE: should we check if state values are valid ?!? // NOTE: should we check if state values are valid ?!?
guiTextBoxState = state; guiTextBoxState = state;
} }
RAYGUIDEF int GuiTextBoxGetByteIndex(const char *text, int start, int from, int to) RAYGUIAPI int GuiTextBoxGetByteIndex(const char *text, int start, int from, int to)
{ {
int i = start, k = from; int i = start, k = from;
while ((text[i] != '\0') && (k < to)) while ((text[i] != '\0') && (k < to))
{ {
int j = 0; int j = 0;
int letter = GetNextCodepoint(&text[i], &j); int letter = GetCodepoint(&text[i], &j);
if (letter == 0x3f) j = 1; if (letter == 0x3f) j = 1;
i += j; i += j;
@ -214,7 +357,7 @@ RAYGUIDEF int GuiTextBoxGetByteIndex(const char *text, int start, int from, int
return i; return i;
} }
RAYGUIDEF int GuiTextBoxDelete(char *text, int length, bool before) RAYGUIAPI int GuiTextBoxDelete(char *text, int length, bool before)
{ {
if ((guiTextBoxState.cursor != -1) && (text != NULL)) if ((guiTextBoxState.cursor != -1) && (text != NULL))
{ {
@ -274,7 +417,7 @@ RAYGUIDEF int GuiTextBoxDelete(char *text, int length, bool before)
return 0; return 0;
} }
RAYGUIDEF void GuiTextBoxSelectAll(const char *text) RAYGUIAPI void GuiTextBoxSelectAll(const char *text)
{ {
guiTextBoxState.cursor = GuiCountCodepointsUntilNewline(text); guiTextBoxState.cursor = GuiCountCodepointsUntilNewline(text);
@ -286,7 +429,7 @@ RAYGUIDEF void GuiTextBoxSelectAll(const char *text)
else guiTextBoxState.select = -1; else guiTextBoxState.select = -1;
} }
RAYGUIDEF void GuiTextBoxCopy(const char *text) RAYGUIAPI void GuiTextBoxCopy(const char *text)
{ {
if ((text != NULL) && if ((text != NULL) &&
(guiTextBoxState.select != -1) && (guiTextBoxState.select != -1) &&
@ -316,7 +459,7 @@ RAYGUIDEF void GuiTextBoxCopy(const char *text)
// Paste text from clipboard into the active textbox. // Paste text from clipboard into the active textbox.
// `text` is the pointer to the buffer used by the textbox while `textSize` is the text buffer max size // `text` is the pointer to the buffer used by the textbox while `textSize` is the text buffer max size
RAYGUIDEF void GuiTextBoxPaste(char *text, int textSize) RAYGUIAPI void GuiTextBoxPaste(char *text, int textSize)
{ {
const char *clipText = GetClipboardText(); // GLFW guaratees this should be UTF8 encoded! const char *clipText = GetClipboardText(); // GLFW guaratees this should be UTF8 encoded!
int length = strlen(text); int length = strlen(text);
@ -349,7 +492,7 @@ RAYGUIDEF void GuiTextBoxPaste(char *text, int textSize)
for (int i = 0; i < (startIdx + size); guiTextBoxState.cursor++) for (int i = 0; i < (startIdx + size); guiTextBoxState.cursor++)
{ {
int next = 0; int next = 0;
int letter = GetNextCodepoint(&text[i], &next); int letter = GetCodepoint(&text[i], &next);
if (letter != 0x3f) i += next; if (letter != 0x3f) i += next;
else i += 1; else i += 1;
} }
@ -358,7 +501,7 @@ RAYGUIDEF void GuiTextBoxPaste(char *text, int textSize)
} }
} }
RAYGUIDEF void GuiTextBoxCut(char* text) RAYGUIAPI void GuiTextBoxCut(char* text)
{ {
if ((text != NULL) && if ((text != NULL) &&
(guiTextBoxState.select != -1) && (guiTextBoxState.select != -1) &&
@ -398,7 +541,7 @@ RAYGUIDEF void GuiTextBoxCut(char* text)
// A text box control supporting text selection, cursor positioning and commonly used keyboard shortcuts. // A text box control supporting text selection, cursor positioning and commonly used keyboard shortcuts.
// NOTE 1: Requires static variables: framesCounter // NOTE 1: Requires static variables: framesCounter
// NOTE 2: Returns if KEY_ENTER pressed (useful for data validation) // NOTE 2: Returns if KEY_ENTER pressed (useful for data validation)
RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool editMode) RAYGUIAPI bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool editMode)
{ {
// Define the cursor movement/selection speed when movement keys are held/pressed // Define the cursor movement/selection speed when movement keys are held/pressed
#define TEXTBOX_CURSOR_COOLDOWN 5 #define TEXTBOX_CURSOR_COOLDOWN 5
@ -436,7 +579,7 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
Rectangle textRec = { bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH) + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING), Rectangle textRec = { bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH) + GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING),
bounds.y + verticalPadding + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.y + verticalPadding + GuiGetStyle(TEXTBOX, BORDER_WIDTH),
bounds.width - 2*(GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING) + GuiGetStyle(TEXTBOX, BORDER_WIDTH)), bounds.width - 2*(GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING) + GuiGetStyle(TEXTBOX, BORDER_WIDTH)),
GuiGetStyle(DEFAULT, TEXT_SIZE) }; (float)GuiGetStyle(DEFAULT, TEXT_SIZE) };
Vector2 cursorPos = { textRec.x, textRec.y }; // This holds the coordinates inside textRec of the cursor at current position and will be recalculated later Vector2 cursorPos = { textRec.x, textRec.y }; // This holds the coordinates inside textRec of the cursor at current position and will be recalculated later
bool active = GuiTextBoxIsActive(bounds); // Check if this textbox is the global active textbox bool active = GuiTextBoxIsActive(bounds); // Check if this textbox is the global active textbox
@ -759,7 +902,7 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
selLength = guiTextBoxState.select - guiTextBoxState.cursor; selLength = guiTextBoxState.select - guiTextBoxState.cursor;
} }
// We aren't drawing all of the text so make sure `DrawTextRecEx()` is selecting things correctly // We aren't drawing all of the text so make sure `DrawTextBoxedSelectable()` is selecting things correctly
if (guiTextBoxState.start > selStart) if (guiTextBoxState.start > selStart)
{ {
selLength -= guiTextBoxState.start - selStart; selLength -= guiTextBoxState.start - selStart;
@ -806,7 +949,7 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
if (pressed) framesCounter = 0; if (pressed) framesCounter = 0;
} }
// Draw control // Draw control
//-------------------------------------------------------------------- //--------------------------------------------------------------------
DrawRectangleLinesEx(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha)); DrawRectangleLinesEx(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha));
@ -816,9 +959,9 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
DrawRectangle(bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.height - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_FOCUSED)), guiAlpha)); DrawRectangle(bounds.x + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), bounds.height - 2*GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_FOCUSED)), guiAlpha));
// Draw blinking cursor // Draw blinking cursor
if (editMode && active && ((framesCounter/TEXTEDIT_CURSOR_BLINK_FRAMES)%2 == 0) && selLength == 0) if (editMode && active && ((framesCounter/30)%2 == 0) && selLength == 0)
{ {
DrawRectangle(cursorPos.x, cursorPos.y, 1, GuiGetStyle(DEFAULT, TEXT_SIZE)*2, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED)), guiAlpha)); DrawRectangle(cursorPos.x, cursorPos.y-1, 1, GuiGetStyle(DEFAULT, TEXT_SIZE)+2, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED)), guiAlpha));
} }
} }
else if (state == GUI_STATE_DISABLED) else if (state == GUI_STATE_DISABLED)
@ -828,7 +971,7 @@ RAYGUIDEF bool GuiTextBoxEx(Rectangle bounds, char *text, int textSize, bool edi
// Finally draw the text and selection // Finally draw the text and selection
DrawTextRecEx(guiFont, &text[textStartIndex], textRec, GuiGetStyle(DEFAULT, TEXT_SIZE), GuiGetStyle(DEFAULT, TEXT_SPACING), false, Fade(GetColor(GuiGetStyle(TEXTBOX, TEXT + (state*3))), guiAlpha), selStart, selLength, GetColor(GuiGetStyle(TEXTBOX, COLOR_SELECTED_FG)), GetColor(GuiGetStyle(TEXTBOX, COLOR_SELECTED_BG))); DrawTextRecEx(guiFont, &text[textStartIndex], textRec, GuiGetStyle(DEFAULT, TEXT_SIZE), GuiGetStyle(DEFAULT, TEXT_SPACING), false, Fade(GetColor(GuiGetStyle(TEXTBOX, TEXT + (state*3))), guiAlpha), selStart, selLength, GetColor(GuiGetStyle(TEXTBOX, COLOR_SELECTED_FG)), GetColor(GuiGetStyle(TEXTBOX, COLOR_SELECTED_BG)));
return pressed; return pressed;
} }
@ -846,7 +989,7 @@ static int GetPrevCodepoint(const char *text, const char *start, int *prev)
{ {
if ((((unsigned char)*p) >> 6) != 2) if ((((unsigned char)*p) >> 6) != 2)
{ {
c = GetNextCodepoint(p, prev); c = GetCodepoint(p, prev);
break; break;
} }
} }
@ -864,7 +1007,7 @@ static inline unsigned int GuiCountCodepointsUntilNewline(const char *text)
while ((*ptr != '\0') && (*ptr != '\n')) while ((*ptr != '\0') && (*ptr != '\n'))
{ {
int next = 0; int next = 0;
int letter = GetNextCodepoint(ptr, &next); int letter = GetCodepoint(ptr, &next);
if (letter == 0x3f) ptr += 1; if (letter == 0x3f) ptr += 1;
else ptr += next; else ptr += next;
@ -874,7 +1017,7 @@ static inline unsigned int GuiCountCodepointsUntilNewline(const char *text)
return len; return len;
} }
// Highly synchronized with calculations in DrawTextRecEx() // Highly synchronized with calculations in DrawTextBoxedSelectable()
static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *pos, int mode) static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *pos, int mode)
{ {
// Get gui font properties // Get gui font properties
@ -897,16 +1040,16 @@ static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *p
{ {
glyphWidth = 0; glyphWidth = 0;
int next = 1; int next = 1;
letter = GetNextCodepoint(&text[i], &next); letter = GetCodepoint(&text[i], &next);
if (letter == 0x3f) next = 1; if (letter == 0x3f) next = 1;
index = GetGlyphIndex(font, letter); index = GetGlyphIndex(font, letter);
i += next - 1; i += next - 1;
if (letter != '\n') if (letter != '\n')
{ {
glyphWidth = (font.chars[index].advanceX == 0)? glyphWidth = (font.glyphs[index].advanceX == 0)?
(int)(font.recs[index].width*scaleFactor + spacing): (int)(font.recs[index].width*scaleFactor + spacing):
(int)(font.chars[index].advanceX*scaleFactor + spacing); (int)(font.glyphs[index].advanceX*scaleFactor + spacing);
if ((textOffsetX + glyphWidth + 1) >= rec.width) break; if ((textOffsetX + glyphWidth + 1) >= rec.width) break;
@ -914,7 +1057,7 @@ static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *p
else if (mode == GUI_MEASURE_MODE_CURSOR_COORDS) else if (mode == GUI_MEASURE_MODE_CURSOR_COORDS)
{ {
// Check if the mouse pointer is inside the glyph rect // Check if the mouse pointer is inside the glyph rect
Rectangle grec = {rec.x + textOffsetX - 1, rec.y, glyphWidth, (font.baseSize + font.baseSize/2)*scaleFactor - 1 }; Rectangle grec = {rec.x + textOffsetX - 1, rec.y, (float)glyphWidth, (font.baseSize + font.baseSize/2)*scaleFactor - 1 };
Vector2 mouse = GetMousePosition(); Vector2 mouse = GetMousePosition();
if (CheckCollisionPointRec(mouse, grec)) if (CheckCollisionPointRec(mouse, grec))
@ -941,7 +1084,7 @@ static int GuiMeasureTextBox(const char *text, int length, Rectangle rec, int *p
} }
// Required by GuiTextBoxEx() // Required by GuiTextBoxEx()
// Highly synchronized with calculations in DrawTextRecEx() // Highly synchronized with calculations in DrawTextBoxedSelectable()
static int GuiMeasureTextBoxRev(const char *text, int length, Rectangle rec, int *pos) static int GuiMeasureTextBoxRev(const char *text, int length, Rectangle rec, int *pos)
{ {
// Get gui font properties // Get gui font properties
@ -970,9 +1113,9 @@ static int GuiMeasureTextBoxRev(const char *text, int length, Rectangle rec, int
if (letter != '\n') if (letter != '\n')
{ {
glyphWidth = (font.chars[index].advanceX == 0)? glyphWidth = (font.glyphs[index].advanceX == 0)?
(int)(font.recs[index].width*scaleFactor + spacing): (int)(font.recs[index].width*scaleFactor + spacing):
(int)(font.chars[index].advanceX*scaleFactor + spacing); (int)(font.glyphs[index].advanceX*scaleFactor + spacing);
if ((textOffsetX + glyphWidth + 1) >= rec.width) break; if ((textOffsetX + glyphWidth + 1) >= rec.width) break;
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,556 +0,0 @@
/**********************************************************************************************
*
* rIcons - Icons pack intended for tools development with raygui
*
* LICENSE: zlib/libpng
*
* Copyright (c) 2019-2020 Ramon Santamaria (@raysan5)
*
**********************************************************************************************/
#ifndef RICONS_H
#define RICONS_H
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
#define RICON_MAX_ICONS 256 // Maximum number of icons
#define RICON_SIZE 16 // Size of icons (squared)
#define RICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id
// Icons data is defined by bit array (every bit represents one pixel)
// Those arrays are stored as unsigned int data arrays, so every array
// element defines 32 pixels (bits) of information
// Number of elemens depend on RICON_SIZE (by default 16x16 pixels)
#define RICON_DATA_ELEMENTS (RICON_SIZE*RICON_SIZE/32)
//----------------------------------------------------------------------------------
// Icons enumeration
//----------------------------------------------------------------------------------
typedef enum {
RICON_NONE = 0,
RICON_FOLDER_FILE_OPEN = 1,
RICON_FILE_SAVE_CLASSIC = 2,
RICON_FOLDER_OPEN = 3,
RICON_FOLDER_SAVE = 4,
RICON_FILE_OPEN = 5,
RICON_FILE_SAVE = 6,
RICON_FILE_EXPORT = 7,
RICON_FILE_NEW = 8,
RICON_FILE_DELETE = 9,
RICON_FILETYPE_TEXT = 10,
RICON_FILETYPE_AUDIO = 11,
RICON_FILETYPE_IMAGE = 12,
RICON_FILETYPE_PLAY = 13,
RICON_FILETYPE_VIDEO = 14,
RICON_FILETYPE_INFO = 15,
RICON_FILE_COPY = 16,
RICON_FILE_CUT = 17,
RICON_FILE_PASTE = 18,
RICON_CURSOR_HAND = 19,
RICON_CURSOR_POINTER = 20,
RICON_CURSOR_CLASSIC = 21,
RICON_PENCIL = 22,
RICON_PENCIL_BIG = 23,
RICON_BRUSH_CLASSIC = 24,
RICON_BRUSH_PAINTER = 25,
RICON_WATER_DROP = 26,
RICON_COLOR_PICKER = 27,
RICON_RUBBER = 28,
RICON_COLOR_BUCKET = 29,
RICON_TEXT_T = 30,
RICON_TEXT_A = 31,
RICON_SCALE = 32,
RICON_RESIZE = 33,
RICON_FILTER_POINT = 34,
RICON_FILTER_BILINEAR = 35,
RICON_CROP = 36,
RICON_CROP_ALPHA = 37,
RICON_SQUARE_TOGGLE = 38,
RICON_SYMMETRY = 39,
RICON_SYMMETRY_HORIZONTAL = 40,
RICON_SYMMETRY_VERTICAL = 41,
RICON_LENS = 42,
RICON_LENS_BIG = 43,
RICON_EYE_ON = 44,
RICON_EYE_OFF = 45,
RICON_FILTER_TOP = 46,
RICON_FILTER = 47,
RICON_TARGET_POINT = 48,
RICON_TARGET_SMALL = 49,
RICON_TARGET_BIG = 50,
RICON_TARGET_MOVE = 51,
RICON_CURSOR_MOVE = 52,
RICON_CURSOR_SCALE = 53,
RICON_CURSOR_SCALE_RIGHT = 54,
RICON_CURSOR_SCALE_LEFT = 55,
RICON_UNDO = 56,
RICON_REDO = 57,
RICON_REREDO = 58,
RICON_MUTATE = 59,
RICON_ROTATE = 60,
RICON_REPEAT = 61,
RICON_SHUFFLE = 62,
RICON_EMPTYBOX = 63,
RICON_TARGET = 64,
RICON_TARGET_SMALL_FILL = 65,
RICON_TARGET_BIG_FILL = 66,
RICON_TARGET_MOVE_FILL = 67,
RICON_CURSOR_MOVE_FILL = 68,
RICON_CURSOR_SCALE_FILL = 69,
RICON_CURSOR_SCALE_RIGHT_FILL = 70,
RICON_CURSOR_SCALE_LEFT_FILL = 71,
RICON_UNDO_FILL = 72,
RICON_REDO_FILL = 73,
RICON_REREDO_FILL = 74,
RICON_MUTATE_FILL = 75,
RICON_ROTATE_FILL = 76,
RICON_REPEAT_FILL = 77,
RICON_SHUFFLE_FILL = 78,
RICON_EMPTYBOX_SMALL = 79,
RICON_BOX = 80,
RICON_BOX_TOP = 81,
RICON_BOX_TOP_RIGHT = 82,
RICON_BOX_RIGHT = 83,
RICON_BOX_BOTTOM_RIGHT = 84,
RICON_BOX_BOTTOM = 85,
RICON_BOX_BOTTOM_LEFT = 86,
RICON_BOX_LEFT = 87,
RICON_BOX_TOP_LEFT = 88,
RICON_BOX_CENTER = 89,
RICON_BOX_CIRCLE_MASK = 90,
RICON_POT = 91,
RICON_ALPHA_MULTIPLY = 92,
RICON_ALPHA_CLEAR = 93,
RICON_DITHERING = 94,
RICON_MIPMAPS = 95,
RICON_BOX_GRID = 96,
RICON_GRID = 97,
RICON_BOX_CORNERS_SMALL = 98,
RICON_BOX_CORNERS_BIG = 99,
RICON_FOUR_BOXES = 100,
RICON_GRID_FILL = 101,
RICON_BOX_MULTISIZE = 102,
RICON_ZOOM_SMALL = 103,
RICON_ZOOM_MEDIUM = 104,
RICON_ZOOM_BIG = 105,
RICON_ZOOM_ALL = 106,
RICON_ZOOM_CENTER = 107,
RICON_BOX_DOTS_SMALL = 108,
RICON_BOX_DOTS_BIG = 109,
RICON_BOX_CONCENTRIC = 110,
RICON_BOX_GRID_BIG = 111,
RICON_OK_TICK = 112,
RICON_CROSS = 113,
RICON_ARROW_LEFT = 114,
RICON_ARROW_RIGHT = 115,
RICON_ARROW_BOTTOM = 116,
RICON_ARROW_TOP = 117,
RICON_ARROW_LEFT_FILL = 118,
RICON_ARROW_RIGHT_FILL = 119,
RICON_ARROW_BOTTOM_FILL = 120,
RICON_ARROW_TOP_FILL = 121,
RICON_AUDIO = 122,
RICON_FX = 123,
RICON_WAVE = 124,
RICON_WAVE_SINUS = 125,
RICON_WAVE_SQUARE = 126,
RICON_WAVE_TRIANGULAR = 127,
RICON_CROSS_SMALL = 128,
RICON_PLAYER_PREVIOUS = 129,
RICON_PLAYER_PLAY_BACK = 130,
RICON_PLAYER_PLAY = 131,
RICON_PLAYER_PAUSE = 132,
RICON_PLAYER_STOP = 133,
RICON_PLAYER_NEXT = 134,
RICON_PLAYER_RECORD = 135,
RICON_MAGNET = 136,
RICON_LOCK_CLOSE = 137,
RICON_LOCK_OPEN = 138,
RICON_CLOCK = 139,
RICON_TOOLS = 140,
RICON_GEAR = 141,
RICON_GEAR_BIG = 142,
RICON_BIN = 143,
RICON_HAND_POINTER = 144,
RICON_LASER = 145,
RICON_COIN = 146,
RICON_EXPLOSION = 147,
RICON_1UP = 148,
RICON_PLAYER = 149,
RICON_PLAYER_JUMP = 150,
RICON_KEY = 151,
RICON_DEMON = 152,
RICON_TEXT_POPUP = 153,
RICON_GEAR_EX = 154,
RICON_CRACK = 155,
RICON_CRACK_POINTS = 156,
RICON_STAR = 157,
RICON_DOOR = 158,
RICON_EXIT = 159,
RICON_MODE_2D = 160,
RICON_MODE_3D = 161,
RICON_CUBE = 162,
RICON_CUBE_FACE_TOP = 163,
RICON_CUBE_FACE_LEFT = 164,
RICON_CUBE_FACE_FRONT = 165,
RICON_CUBE_FACE_BOTTOM = 166,
RICON_CUBE_FACE_RIGHT = 167,
RICON_CUBE_FACE_BACK = 168,
RICON_CAMERA = 169,
RICON_SPECIAL = 170,
RICON_LINK_NET = 171,
RICON_LINK_BOXES = 172,
RICON_LINK_MULTI = 173,
RICON_LINK = 174,
RICON_LINK_BROKE = 175,
RICON_TEXT_NOTES = 176,
RICON_NOTEBOOK = 177,
RICON_SUITCASE = 178,
RICON_SUITCASE_ZIP = 179,
RICON_MAILBOX = 180,
RICON_MONITOR = 181,
RICON_PRINTER = 182,
RICON_PHOTO_CAMERA = 183,
RICON_PHOTO_CAMERA_FLASH = 184,
RICON_HOUSE = 185,
RICON_HEART = 186,
RICON_CORNER = 187,
RICON_VERTICAL_BARS = 188,
RICON_VERTICAL_BARS_FILL = 189,
RICON_LIFE_BARS = 190,
RICON_INFO = 191,
RICON_CROSSLINE = 192,
RICON_HELP = 193,
RICON_FILETYPE_ALPHA = 194,
RICON_FILETYPE_HOME = 195,
RICON_LAYERS_VISIBLE = 196,
RICON_LAYERS = 197,
RICON_WINDOW = 198,
RICON_HIDPI = 199,
RICON_200 = 200,
RICON_201 = 201,
RICON_202 = 202,
RICON_203 = 203,
RICON_204 = 204,
RICON_205 = 205,
RICON_206 = 206,
RICON_207 = 207,
RICON_208 = 208,
RICON_209 = 209,
RICON_210 = 210,
RICON_211 = 211,
RICON_212 = 212,
RICON_213 = 213,
RICON_214 = 214,
RICON_215 = 215,
RICON_216 = 216,
RICON_217 = 217,
RICON_218 = 218,
RICON_219 = 219,
RICON_220 = 220,
RICON_221 = 221,
RICON_222 = 222,
RICON_223 = 223,
RICON_224 = 224,
RICON_225 = 225,
RICON_226 = 226,
RICON_227 = 227,
RICON_228 = 228,
RICON_229 = 229,
RICON_230 = 230,
RICON_231 = 231,
RICON_232 = 232,
RICON_233 = 233,
RICON_234 = 234,
RICON_235 = 235,
RICON_236 = 236,
RICON_237 = 237,
RICON_238 = 238,
RICON_239 = 239,
RICON_240 = 240,
RICON_241 = 241,
RICON_242 = 242,
RICON_243 = 243,
RICON_244 = 244,
RICON_245 = 245,
RICON_246 = 246,
RICON_247 = 247,
RICON_248 = 248,
RICON_249 = 249,
RICON_250 = 250,
RICON_251 = 251,
RICON_252 = 252,
RICON_253 = 253,
RICON_254 = 254,
RICON_255 = 255,
} guiIconName;
#endif // RICONS_H
#if defined(RICONS_IMPLEMENTATION)
//----------------------------------------------------------------------------------
// Icons data (allocated on memory data section by default)
// NOTE: A new icon set could be loaded over this array using GuiLoadIcons(),
// just note that loaded icons set must be same RICON_SIZE
//----------------------------------------------------------------------------------
static unsigned int guiIcons[RICON_MAX_ICONS*RICON_DATA_ELEMENTS] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_NONE
0x3ff80000, 0x2f082008, 0x2042207e, 0x40027fc2, 0x40024002, 0x40024002, 0x40024002, 0x00007ffe, // RICON_FOLDER_FILE_OPEN
0x3ffe0000, 0x44226422, 0x400247e2, 0x5ffa4002, 0x57ea500a, 0x500a500a, 0x40025ffa, 0x00007ffe, // RICON_FILE_SAVE_CLASSIC
0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024002, 0x44424282, 0x793e4102, 0x00000100, // RICON_FOLDER_OPEN
0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024102, 0x44424102, 0x793e4282, 0x00000000, // RICON_FOLDER_SAVE
0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x24442284, 0x21042104, 0x20042104, 0x00003ffc, // RICON_FILE_OPEN
0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x21042104, 0x22842444, 0x20042104, 0x00003ffc, // RICON_FILE_SAVE
0x3ff00000, 0x201c2010, 0x00042004, 0x20041004, 0x20844784, 0x00841384, 0x20042784, 0x00003ffc, // RICON_FILE_EXPORT
0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x22042204, 0x22042f84, 0x20042204, 0x00003ffc, // RICON_FILE_NEW
0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x25042884, 0x25042204, 0x20042884, 0x00003ffc, // RICON_FILE_DELETE
0x3ff00000, 0x201c2010, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc, // RICON_FILETYPE_TEXT
0x3ff00000, 0x201c2010, 0x27042004, 0x244424c4, 0x26442444, 0x20642664, 0x20042004, 0x00003ffc, // RICON_FILETYPE_AUDIO
0x3ff00000, 0x201c2010, 0x26042604, 0x20042004, 0x35442884, 0x2414222c, 0x20042004, 0x00003ffc, // RICON_FILETYPE_IMAGE
0x3ff00000, 0x201c2010, 0x20c42004, 0x22442144, 0x22442444, 0x20c42144, 0x20042004, 0x00003ffc, // RICON_FILETYPE_PLAY
0x3ff00000, 0x3ffc2ff0, 0x3f3c2ff4, 0x3dbc2eb4, 0x3dbc2bb4, 0x3f3c2eb4, 0x3ffc2ff4, 0x00002ff4, // RICON_FILETYPE_VIDEO
0x3ff00000, 0x201c2010, 0x21842184, 0x21842004, 0x21842184, 0x21842184, 0x20042184, 0x00003ffc, // RICON_FILETYPE_INFO
0x0ff00000, 0x381c0810, 0x28042804, 0x28042804, 0x28042804, 0x28042804, 0x20102ffc, 0x00003ff0, // RICON_FILE_COPY
0x00000000, 0x701c0000, 0x079c1e14, 0x55a000f0, 0x079c00f0, 0x701c1e14, 0x00000000, 0x00000000, // RICON_FILE_CUT
0x01c00000, 0x13e41bec, 0x3f841004, 0x204420c4, 0x20442044, 0x20442044, 0x207c2044, 0x00003fc0, // RICON_FILE_PASTE
0x00000000, 0x3aa00fe0, 0x2abc2aa0, 0x2aa42aa4, 0x20042aa4, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_CURSOR_HAND
0x00000000, 0x003c000c, 0x030800c8, 0x30100c10, 0x10202020, 0x04400840, 0x01800280, 0x00000000, // RICON_CURSOR_POINTER
0x00000000, 0x00180000, 0x01f00078, 0x03e007f0, 0x07c003e0, 0x04000e40, 0x00000000, 0x00000000, // RICON_CURSOR_CLASSIC
0x00000000, 0x04000000, 0x11000a00, 0x04400a80, 0x01100220, 0x00580088, 0x00000038, 0x00000000, // RICON_PENCIL
0x04000000, 0x15000a00, 0x50402880, 0x14102820, 0x05040a08, 0x015c028c, 0x007c00bc, 0x00000000, // RICON_PENCIL_BIG
0x01c00000, 0x01400140, 0x01400140, 0x0ff80140, 0x0ff80808, 0x0aa80808, 0x0aa80aa8, 0x00000ff8, // RICON_BRUSH_CLASSIC
0x1ffc0000, 0x5ffc7ffe, 0x40004000, 0x00807f80, 0x01c001c0, 0x01c001c0, 0x01c001c0, 0x00000080, // RICON_BRUSH_PAINTER
0x00000000, 0x00800000, 0x01c00080, 0x03e001c0, 0x07f003e0, 0x036006f0, 0x000001c0, 0x00000000, // RICON_WATER_DROP
0x00000000, 0x3e003800, 0x1f803f80, 0x0c201e40, 0x02080c10, 0x00840104, 0x00380044, 0x00000000, // RICON_COLOR_PICKER
0x00000000, 0x07800300, 0x1fe00fc0, 0x3f883fd0, 0x0e021f04, 0x02040402, 0x00f00108, 0x00000000, // RICON_RUBBER
0x00c00000, 0x02800140, 0x08200440, 0x20081010, 0x2ffe3004, 0x03f807fc, 0x00e001f0, 0x00000040, // RICON_COLOR_BUCKET
0x00000000, 0x21843ffc, 0x01800180, 0x01800180, 0x01800180, 0x01800180, 0x03c00180, 0x00000000, // RICON_TEXT_T
0x00800000, 0x01400180, 0x06200340, 0x0c100620, 0x1ff80c10, 0x380c1808, 0x70067004, 0x0000f80f, // RICON_TEXT_A
0x78000000, 0x50004000, 0x00004800, 0x03c003c0, 0x03c003c0, 0x00100000, 0x0002000a, 0x0000000e, // RICON_SCALE
0x75560000, 0x5e004002, 0x54001002, 0x41001202, 0x408200fe, 0x40820082, 0x40820082, 0x00006afe, // RICON_RESIZE
0x00000000, 0x3f003f00, 0x3f003f00, 0x3f003f00, 0x00400080, 0x001c0020, 0x001c001c, 0x00000000, // RICON_FILTER_POINT
0x6d800000, 0x00004080, 0x40804080, 0x40800000, 0x00406d80, 0x001c0020, 0x001c001c, 0x00000000, // RICON_FILTER_BILINEAR
0x40080000, 0x1ffe2008, 0x14081008, 0x11081208, 0x10481088, 0x10081028, 0x10047ff8, 0x00001002, // RICON_CROP
0x00100000, 0x3ffc0010, 0x2ab03550, 0x22b02550, 0x20b02150, 0x20302050, 0x2000fff0, 0x00002000, // RICON_CROP_ALPHA
0x40000000, 0x1ff82000, 0x04082808, 0x01082208, 0x00482088, 0x00182028, 0x35542008, 0x00000002, // RICON_SQUARE_TOGGLE
0x00000000, 0x02800280, 0x06c006c0, 0x0ea00ee0, 0x1e901eb0, 0x3e883e98, 0x7efc7e8c, 0x00000000, // RICON_SIMMETRY
0x01000000, 0x05600100, 0x1d480d50, 0x7d423d44, 0x3d447d42, 0x0d501d48, 0x01000560, 0x00000100, // RICON_SIMMETRY_HORIZONTAL
0x01800000, 0x04200240, 0x10080810, 0x00001ff8, 0x00007ffe, 0x0ff01ff8, 0x03c007e0, 0x00000180, // RICON_SIMMETRY_VERTICAL
0x00000000, 0x010800f0, 0x02040204, 0x02040204, 0x07f00308, 0x1c000e00, 0x30003800, 0x00000000, // RICON_LENS
0x00000000, 0x061803f0, 0x08240c0c, 0x08040814, 0x0c0c0804, 0x23f01618, 0x18002400, 0x00000000, // RICON_LENS_BIG
0x00000000, 0x00000000, 0x1c7007c0, 0x638e3398, 0x1c703398, 0x000007c0, 0x00000000, 0x00000000, // RICON_EYE_ON
0x00000000, 0x10002000, 0x04700fc0, 0x610e3218, 0x1c703098, 0x001007a0, 0x00000008, 0x00000000, // RICON_EYE_OFF
0x00000000, 0x00007ffc, 0x40047ffc, 0x10102008, 0x04400820, 0x02800280, 0x02800280, 0x00000100, // RICON_FILTER_TOP
0x00000000, 0x40027ffe, 0x10082004, 0x04200810, 0x02400240, 0x02400240, 0x01400240, 0x000000c0, // RICON_FILTER
0x00800000, 0x00800080, 0x00000080, 0x3c9e0000, 0x00000000, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_POINT
0x00800000, 0x00800080, 0x00800080, 0x3f7e01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_SMALL
0x00800000, 0x00800080, 0x03e00080, 0x3e3e0220, 0x03e00220, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_BIG
0x01000000, 0x04400280, 0x01000100, 0x43842008, 0x43849ab2, 0x01002008, 0x04400100, 0x01000280, // RICON_TARGET_MOVE
0x01000000, 0x04400280, 0x01000100, 0x41042108, 0x41049ff2, 0x01002108, 0x04400100, 0x01000280, // RICON_CURSOR_MOVE
0x781e0000, 0x500a4002, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x4002500a, 0x0000781e, // RICON_CURSOR_SCALE
0x00000000, 0x20003c00, 0x24002800, 0x01000200, 0x00400080, 0x00140024, 0x003c0004, 0x00000000, // RICON_CURSOR_SCALE_RIGHT
0x00000000, 0x0004003c, 0x00240014, 0x00800040, 0x02000100, 0x28002400, 0x3c002000, 0x00000000, // RICON_CURSOR_SCALE_LEFT
0x00000000, 0x00100020, 0x10101fc8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000, // RICON_UNDO
0x00000000, 0x08000400, 0x080813f8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000, // RICON_REDO
0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3f902020, 0x00400020, 0x00000000, // RICON_REREDO
0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3fc82010, 0x00200010, 0x00000000, // RICON_MUTATE
0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18101020, 0x00100fc8, 0x00000020, // RICON_ROTATE
0x00000000, 0x04000200, 0x240429fc, 0x20042204, 0x20442004, 0x3f942024, 0x00400020, 0x00000000, // RICON_REPEAT
0x00000000, 0x20001000, 0x22104c0e, 0x00801120, 0x11200040, 0x4c0e2210, 0x10002000, 0x00000000, // RICON_SHUFFLE
0x7ffe0000, 0x50024002, 0x44024802, 0x41024202, 0x40424082, 0x40124022, 0x4002400a, 0x00007ffe, // RICON_EMPTYBOX
0x00800000, 0x03e00080, 0x08080490, 0x3c9e0808, 0x08080808, 0x03e00490, 0x00800080, 0x00000000, // RICON_TARGET
0x00800000, 0x00800080, 0x00800080, 0x3ffe01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_SMALL_FILL
0x00800000, 0x00800080, 0x03e00080, 0x3ffe03e0, 0x03e003e0, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_BIG_FILL
0x01000000, 0x07c00380, 0x01000100, 0x638c2008, 0x638cfbbe, 0x01002008, 0x07c00100, 0x01000380, // RICON_TARGET_MOVE_FILL
0x01000000, 0x07c00380, 0x01000100, 0x610c2108, 0x610cfffe, 0x01002108, 0x07c00100, 0x01000380, // RICON_CURSOR_MOVE_FILL
0x781e0000, 0x6006700e, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x700e6006, 0x0000781e, // RICON_CURSOR_SCALE_FILL
0x00000000, 0x38003c00, 0x24003000, 0x01000200, 0x00400080, 0x000c0024, 0x003c001c, 0x00000000, // RICON_CURSOR_SCALE_RIGHT
0x00000000, 0x001c003c, 0x0024000c, 0x00800040, 0x02000100, 0x30002400, 0x3c003800, 0x00000000, // RICON_CURSOR_SCALE_LEFT
0x00000000, 0x00300020, 0x10301ff8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000, // RICON_UNDO_FILL
0x00000000, 0x0c000400, 0x0c081ff8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000, // RICON_REDO_FILL
0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3ff02060, 0x00400060, 0x00000000, // RICON_REREDO_FILL
0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3ff82030, 0x00200030, 0x00000000, // RICON_MUTATE_FILL
0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18301020, 0x00300ff8, 0x00000020, // RICON_ROTATE_FILL
0x00000000, 0x06000200, 0x26042ffc, 0x20042204, 0x20442004, 0x3ff42064, 0x00400060, 0x00000000, // RICON_REPEAT_FILL
0x00000000, 0x30001000, 0x32107c0e, 0x00801120, 0x11200040, 0x7c0e3210, 0x10003000, 0x00000000, // RICON_SHUFFLE_FILL
0x00000000, 0x30043ffc, 0x24042804, 0x21042204, 0x20442084, 0x20142024, 0x3ffc200c, 0x00000000, // RICON_EMPTYBOX_SMALL
0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX
0x00000000, 0x23c43ffc, 0x23c423c4, 0x200423c4, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_TOP
0x00000000, 0x3e043ffc, 0x3e043e04, 0x20043e04, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_TOP_RIGHT
0x00000000, 0x20043ffc, 0x20042004, 0x3e043e04, 0x3e043e04, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_RIGHT
0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x3e042004, 0x3e043e04, 0x3ffc3e04, 0x00000000, // RICON_BOX_BOTTOM_RIGHT
0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x23c42004, 0x23c423c4, 0x3ffc23c4, 0x00000000, // RICON_BOX_BOTTOM
0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x207c2004, 0x207c207c, 0x3ffc207c, 0x00000000, // RICON_BOX_BOTTOM_LEFT
0x00000000, 0x20043ffc, 0x20042004, 0x207c207c, 0x207c207c, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_LEFT
0x00000000, 0x207c3ffc, 0x207c207c, 0x2004207c, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_TOP_LEFT
0x00000000, 0x20043ffc, 0x20042004, 0x23c423c4, 0x23c423c4, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_CIRCLE_MASK
0x7ffe0000, 0x40024002, 0x47e24182, 0x4ff247e2, 0x47e24ff2, 0x418247e2, 0x40024002, 0x00007ffe, // RICON_BOX_CENTER
0x7fff0000, 0x40014001, 0x40014001, 0x49555ddd, 0x4945495d, 0x400149c5, 0x40014001, 0x00007fff, // RICON_POT
0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x404e40ce, 0x48125432, 0x4006540e, 0x00007ffe, // RICON_ALPHA_MULTIPLY
0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x5c4e40ce, 0x44124432, 0x40065c0e, 0x00007ffe, // RICON_ALPHA_CLEAR
0x7ffe0000, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x00007ffe, // RICON_DITHERING
0x07fe0000, 0x1ffa0002, 0x7fea000a, 0x402a402a, 0x5b2a512a, 0x5128552a, 0x40205128, 0x00007fe0, // RICON_MIPMAPS
0x00000000, 0x1ff80000, 0x12481248, 0x12481ff8, 0x1ff81248, 0x12481248, 0x00001ff8, 0x00000000, // RICON_BOX_GRID
0x12480000, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x00001248, // RICON_GRID
0x00000000, 0x1c380000, 0x1c3817e8, 0x08100810, 0x08100810, 0x17e81c38, 0x00001c38, 0x00000000, // RICON_BOX_CORNERS_SMALL
0x700e0000, 0x700e5ffa, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x5ffa700e, 0x0000700e, // RICON_BOX_CORNERS_BIG
0x3f7e0000, 0x21422142, 0x21422142, 0x00003f7e, 0x21423f7e, 0x21422142, 0x3f7e2142, 0x00000000, // RICON_FOUR_BOXES
0x00000000, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x00000000, // RICON_GRID_FILL
0x7ffe0000, 0x7ffe7ffe, 0x77fe7000, 0x77fe77fe, 0x777e7700, 0x777e777e, 0x777e777e, 0x0000777e, // RICON_BOX_MULTISIZE
0x781e0000, 0x40024002, 0x00004002, 0x01800000, 0x00000180, 0x40020000, 0x40024002, 0x0000781e, // RICON_ZOOM_SMALL
0x781e0000, 0x40024002, 0x00004002, 0x03c003c0, 0x03c003c0, 0x40020000, 0x40024002, 0x0000781e, // RICON_ZOOM_MEDIUM
0x781e0000, 0x40024002, 0x07e04002, 0x07e007e0, 0x07e007e0, 0x400207e0, 0x40024002, 0x0000781e, // RICON_ZOOM_BIG
0x781e0000, 0x5ffa4002, 0x1ff85ffa, 0x1ff81ff8, 0x1ff81ff8, 0x5ffa1ff8, 0x40025ffa, 0x0000781e, // RICON_ZOOM_ALL
0x00000000, 0x2004381c, 0x00002004, 0x00000000, 0x00000000, 0x20040000, 0x381c2004, 0x00000000, // RICON_ZOOM_CENTER
0x00000000, 0x1db80000, 0x10081008, 0x10080000, 0x00001008, 0x10081008, 0x00001db8, 0x00000000, // RICON_BOX_DOTS_SMALL
0x35560000, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x35562002, 0x00000000, // RICON_BOX_DOTS_BIG
0x7ffe0000, 0x40024002, 0x48124ff2, 0x49924812, 0x48124992, 0x4ff24812, 0x40024002, 0x00007ffe, // RICON_BOX_CONCENTRIC
0x00000000, 0x10841ffc, 0x10841084, 0x1ffc1084, 0x10841084, 0x10841084, 0x00001ffc, 0x00000000, // RICON_BOX_GRID_BIG
0x00000000, 0x00000000, 0x10000000, 0x04000800, 0x01040200, 0x00500088, 0x00000020, 0x00000000, // RICON_OK_TICK
0x00000000, 0x10080000, 0x04200810, 0x01800240, 0x02400180, 0x08100420, 0x00001008, 0x00000000, // RICON_CROSS
0x00000000, 0x02000000, 0x00800100, 0x00200040, 0x00200010, 0x00800040, 0x02000100, 0x00000000, // RICON_ARROW_LEFT
0x00000000, 0x00400000, 0x01000080, 0x04000200, 0x04000800, 0x01000200, 0x00400080, 0x00000000, // RICON_ARROW_RIGHT
0x00000000, 0x00000000, 0x00000000, 0x08081004, 0x02200410, 0x00800140, 0x00000000, 0x00000000, // RICON_ARROW_BOTTOM
0x00000000, 0x00000000, 0x01400080, 0x04100220, 0x10040808, 0x00000000, 0x00000000, 0x00000000, // RICON_ARROW_TOP
0x00000000, 0x02000000, 0x03800300, 0x03e003c0, 0x03e003f0, 0x038003c0, 0x02000300, 0x00000000, // RICON_ARROW_LEFT_FILL
0x00000000, 0x00400000, 0x01c000c0, 0x07c003c0, 0x07c00fc0, 0x01c003c0, 0x004000c0, 0x00000000, // RICON_ARROW_RIGHT_FILL
0x00000000, 0x00000000, 0x00000000, 0x0ff81ffc, 0x03e007f0, 0x008001c0, 0x00000000, 0x00000000, // RICON_ARROW_BOTTOM_FILL
0x00000000, 0x00000000, 0x01c00080, 0x07f003e0, 0x1ffc0ff8, 0x00000000, 0x00000000, 0x00000000, // RICON_ARROW_TOP_FILL
0x00000000, 0x18a008c0, 0x32881290, 0x24822686, 0x26862482, 0x12903288, 0x08c018a0, 0x00000000, // RICON_AUDIO
0x00000000, 0x04800780, 0x004000c0, 0x662000f0, 0x08103c30, 0x130a0e18, 0x0000318e, 0x00000000, // RICON_FX
0x00000000, 0x00800000, 0x08880888, 0x2aaa0a8a, 0x0a8a2aaa, 0x08880888, 0x00000080, 0x00000000, // RICON_WAVE
0x00000000, 0x00600000, 0x01080090, 0x02040108, 0x42044204, 0x24022402, 0x00001800, 0x00000000, // RICON_WAVE_SINUS
0x00000000, 0x07f80000, 0x04080408, 0x04080408, 0x04080408, 0x7c0e0408, 0x00000000, 0x00000000, // RICON_WAVE_SQUARE
0x00000000, 0x00000000, 0x00a00040, 0x22084110, 0x08021404, 0x00000000, 0x00000000, 0x00000000, // RICON_WAVE_TRIANGULAR
0x00000000, 0x00000000, 0x04200000, 0x01800240, 0x02400180, 0x00000420, 0x00000000, 0x00000000, // RICON_CROSS_SMALL
0x00000000, 0x18380000, 0x12281428, 0x10a81128, 0x112810a8, 0x14281228, 0x00001838, 0x00000000, // RICON_PLAYER_PREVIOUS
0x00000000, 0x18000000, 0x11801600, 0x10181060, 0x10601018, 0x16001180, 0x00001800, 0x00000000, // RICON_PLAYER_PLAY_BACK
0x00000000, 0x00180000, 0x01880068, 0x18080608, 0x06081808, 0x00680188, 0x00000018, 0x00000000, // RICON_PLAYER_PLAY
0x00000000, 0x1e780000, 0x12481248, 0x12481248, 0x12481248, 0x12481248, 0x00001e78, 0x00000000, // RICON_PLAYER_PAUSE
0x00000000, 0x1ff80000, 0x10081008, 0x10081008, 0x10081008, 0x10081008, 0x00001ff8, 0x00000000, // RICON_PLAYER_STOP
0x00000000, 0x1c180000, 0x14481428, 0x15081488, 0x14881508, 0x14281448, 0x00001c18, 0x00000000, // RICON_PLAYER_NEXT
0x00000000, 0x03c00000, 0x08100420, 0x10081008, 0x10081008, 0x04200810, 0x000003c0, 0x00000000, // RICON_PLAYER_RECORD
0x00000000, 0x0c3007e0, 0x13c81818, 0x14281668, 0x14281428, 0x1c381c38, 0x08102244, 0x00000000, // RICON_MAGNET
0x07c00000, 0x08200820, 0x3ff80820, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000, // RICON_LOCK_CLOSE
0x07c00000, 0x08000800, 0x3ff80800, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000, // RICON_LOCK_OPEN
0x01c00000, 0x0c180770, 0x3086188c, 0x60832082, 0x60034781, 0x30062002, 0x0c18180c, 0x01c00770, // RICON_CLOCK
0x0a200000, 0x1b201b20, 0x04200e20, 0x04200420, 0x04700420, 0x0e700e70, 0x0e700e70, 0x04200e70, // RICON_TOOLS
0x01800000, 0x3bdc318c, 0x0ff01ff8, 0x7c3e1e78, 0x1e787c3e, 0x1ff80ff0, 0x318c3bdc, 0x00000180, // RICON_GEAR
0x01800000, 0x3ffc318c, 0x1c381ff8, 0x781e1818, 0x1818781e, 0x1ff81c38, 0x318c3ffc, 0x00000180, // RICON_GEAR_BIG
0x00000000, 0x08080ff8, 0x08081ffc, 0x0aa80aa8, 0x0aa80aa8, 0x0aa80aa8, 0x08080aa8, 0x00000ff8, // RICON_BIN
0x00000000, 0x00000000, 0x20043ffc, 0x08043f84, 0x04040f84, 0x04040784, 0x000007fc, 0x00000000, // RICON_HAND_POINTER
0x00000000, 0x24400400, 0x00001480, 0x6efe0e00, 0x00000e00, 0x24401480, 0x00000400, 0x00000000, // RICON_LASER
0x00000000, 0x03c00000, 0x08300460, 0x11181118, 0x11181118, 0x04600830, 0x000003c0, 0x00000000, // RICON_COIN
0x00000000, 0x10880080, 0x06c00810, 0x366c07e0, 0x07e00240, 0x00001768, 0x04200240, 0x00000000, // RICON_EXPLOSION
0x00000000, 0x3d280000, 0x2528252c, 0x3d282528, 0x05280528, 0x05e80528, 0x00000000, 0x00000000, // RICON_1UP
0x01800000, 0x03c003c0, 0x018003c0, 0x0ff007e0, 0x0bd00bd0, 0x0a500bd0, 0x02400240, 0x02400240, // RICON_PLAYER
0x01800000, 0x03c003c0, 0x118013c0, 0x03c81ff8, 0x07c003c8, 0x04400440, 0x0c080478, 0x00000000, // RICON_PLAYER_JUMP
0x3ff80000, 0x30183ff8, 0x30183018, 0x3ff83ff8, 0x03000300, 0x03c003c0, 0x03e00300, 0x000003e0, // RICON_KEY
0x3ff80000, 0x3ff83ff8, 0x33983ff8, 0x3ff83398, 0x3ff83ff8, 0x00000540, 0x0fe00aa0, 0x00000fe0, // RICON_DEMON
0x00000000, 0x0ff00000, 0x20041008, 0x25442004, 0x10082004, 0x06000bf0, 0x00000300, 0x00000000, // RICON_TEXT_POPUP
0x00000000, 0x11440000, 0x07f00be8, 0x1c1c0e38, 0x1c1c0c18, 0x07f00e38, 0x11440be8, 0x00000000, // RICON_GEAR_EX
0x00000000, 0x20080000, 0x0c601010, 0x07c00fe0, 0x07c007c0, 0x0c600fe0, 0x20081010, 0x00000000, // RICON_CRACK
0x00000000, 0x20080000, 0x0c601010, 0x04400fe0, 0x04405554, 0x0c600fe0, 0x20081010, 0x00000000, // RICON_CRACK_POINTS
0x00000000, 0x00800080, 0x01c001c0, 0x1ffc3ffe, 0x03e007f0, 0x07f003e0, 0x0c180770, 0x00000808, // RICON_STAR
0x0ff00000, 0x08180810, 0x08100818, 0x0a100810, 0x08180810, 0x08100818, 0x08100810, 0x00001ff8, // RICON_DOOR
0x0ff00000, 0x08100810, 0x08100810, 0x10100010, 0x4f902010, 0x10102010, 0x08100010, 0x00000ff0, // RICON_EXIT
0x00040000, 0x001f000e, 0x0ef40004, 0x12f41284, 0x0ef41214, 0x10040004, 0x7ffc3004, 0x10003000, // RICON_MODE_2D
0x78040000, 0x501f600e, 0x0ef44004, 0x12f41284, 0x0ef41284, 0x10140004, 0x7ffc300c, 0x10003000, // RICON_MODE_3D
0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe, // RICON_CUBE
0x7fe00000, 0x5ff87ff0, 0x47fe4ffc, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe, // RICON_CUBE_FACE_TOP
0x7fe00000, 0x50386030, 0x47fe483c, 0x443e443e, 0x443e443e, 0x241e75fe, 0x0c06140e, 0x000007fe, // RICON_CUBE_FACE_LEFT
0x7fe00000, 0x50286030, 0x47fe4804, 0x47fe47fe, 0x47fe47fe, 0x27fe77fe, 0x0ffe17fe, 0x000007fe, // RICON_CUBE_FACE_FRONT
0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x3ff27fe2, 0x0ffe1ffa, 0x000007fe, // RICON_CUBE_FACE_BOTTOM
0x7fe00000, 0x70286030, 0x7ffe7804, 0x7c227c02, 0x7c227c22, 0x3c127de2, 0x0c061c0a, 0x000007fe, // RICON_CUBE_FACE_RIGHT
0x7fe00000, 0x7fe87ff0, 0x7ffe7fe4, 0x7fe27fe2, 0x7fe27fe2, 0x24127fe2, 0x0c06140a, 0x000007fe, // RICON_CUBE_FACE_BACK
0x00000000, 0x2a0233fe, 0x22022602, 0x22022202, 0x2a022602, 0x00a033fe, 0x02080110, 0x00000000, // RICON_CAMERA
0x00000000, 0x200c3ffc, 0x000c000c, 0x3ffc000c, 0x30003000, 0x30003000, 0x3ffc3004, 0x00000000, // RICON_SPECIAL
0x00000000, 0x0022003e, 0x012201e2, 0x0100013e, 0x01000100, 0x79000100, 0x4f004900, 0x00007800, // RICON_LINK_NET
0x00000000, 0x44007c00, 0x45004600, 0x00627cbe, 0x00620022, 0x45007cbe, 0x44004600, 0x00007c00, // RICON_LINK_BOXES
0x00000000, 0x0044007c, 0x0010007c, 0x3f100010, 0x3f1021f0, 0x3f100010, 0x3f0021f0, 0x00000000, // RICON_LINK_MULTI
0x00000000, 0x0044007c, 0x00440044, 0x0010007c, 0x00100010, 0x44107c10, 0x440047f0, 0x00007c00, // RICON_LINK
0x00000000, 0x0044007c, 0x00440044, 0x0000007c, 0x00000010, 0x44007c10, 0x44004550, 0x00007c00, // RICON_LINK_BROKE
0x02a00000, 0x22a43ffc, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc, // RICON_TEXT_NOTES
0x3ffc0000, 0x20042004, 0x245e27c4, 0x27c42444, 0x2004201e, 0x201e2004, 0x20042004, 0x00003ffc, // RICON_NOTEBOOK
0x00000000, 0x07e00000, 0x04200420, 0x24243ffc, 0x24242424, 0x24242424, 0x3ffc2424, 0x00000000, // RICON_SUITCASE
0x00000000, 0x0fe00000, 0x08200820, 0x40047ffc, 0x7ffc5554, 0x40045554, 0x7ffc4004, 0x00000000, // RICON_SUITCASE_ZIP
0x00000000, 0x20043ffc, 0x3ffc2004, 0x13c81008, 0x100813c8, 0x10081008, 0x1ff81008, 0x00000000, // RICON_MAILBOX
0x00000000, 0x40027ffe, 0x5ffa5ffa, 0x5ffa5ffa, 0x40025ffa, 0x03c07ffe, 0x1ff81ff8, 0x00000000, // RICON_MONITOR
0x0ff00000, 0x6bfe7ffe, 0x7ffe7ffe, 0x68167ffe, 0x08106816, 0x08100810, 0x0ff00810, 0x00000000, // RICON_PRINTER
0x3ff80000, 0xfffe2008, 0x870a8002, 0x904a888a, 0x904a904a, 0x870a888a, 0xfffe8002, 0x00000000, // RICON_PHOTO_CAMERA
0x0fc00000, 0xfcfe0cd8, 0x8002fffe, 0x84428382, 0x84428442, 0x80028382, 0xfffe8002, 0x00000000, // RICON_PHOTO_CAMERA_FLASH
0x00000000, 0x02400180, 0x08100420, 0x20041008, 0x23c42004, 0x22442244, 0x3ffc2244, 0x00000000, // RICON_HOUSE
0x00000000, 0x1c700000, 0x3ff83ef8, 0x3ff83ff8, 0x0fe01ff0, 0x038007c0, 0x00000100, 0x00000000, // RICON_HEART
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0xe000c000, // RICON_CORNER
0x00000000, 0x14001c00, 0x15c01400, 0x15401540, 0x155c1540, 0x15541554, 0x1ddc1554, 0x00000000, // RICON_VERTICAL_BARS
0x00000000, 0x03000300, 0x1b001b00, 0x1b601b60, 0x1b6c1b60, 0x1b6c1b6c, 0x1b6c1b6c, 0x00000000, // RICON_VERTICAL_BARS_FILL
0x00000000, 0x00000000, 0x403e7ffe, 0x7ffe403e, 0x7ffe0000, 0x43fe43fe, 0x00007ffe, 0x00000000, // RICON_LIFE_BARS
0x7ffc0000, 0x43844004, 0x43844284, 0x43844004, 0x42844284, 0x42844284, 0x40044384, 0x00007ffc, // RICON_INFO
0x40008000, 0x10002000, 0x04000800, 0x01000200, 0x00400080, 0x00100020, 0x00040008, 0x00010002, // RICON_CROSSLINE
0x00000000, 0x1ff01ff0, 0x18301830, 0x1f001830, 0x03001f00, 0x00000300, 0x03000300, 0x00000000, // RICON_HELP
0x3ff00000, 0x2abc3550, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x00003ffc, // RICON_FILETYPE_ALPHA
0x3ff00000, 0x201c2010, 0x22442184, 0x28142424, 0x29942814, 0x2ff42994, 0x20042004, 0x00003ffc, // RICON_FILETYPE_HOME
0x07fe0000, 0x04020402, 0x7fe20402, 0x44224422, 0x44224422, 0x402047fe, 0x40204020, 0x00007fe0, // RICON_LAYERS_VISIBLE
0x07fe0000, 0x04020402, 0x7c020402, 0x44024402, 0x44024402, 0x402047fe, 0x40204020, 0x00007fe0, // RICON_LAYERS
0x00000000, 0x40027ffe, 0x7ffe4002, 0x40024002, 0x40024002, 0x40024002, 0x7ffe4002, 0x00000000, // RICON_WINDOW
0x09100000, 0x09f00910, 0x09100910, 0x00000910, 0x24a2779e, 0x27a224a2, 0x709e20a2, 0x00000000, // RICON_HIDPI
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_200
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_201
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_202
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_203
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_204
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_205
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_206
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_207
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_208
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_209
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_210
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_211
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_212
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_213
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_214
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_215
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_216
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_217
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_218
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_219
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_220
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_221
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_222
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_223
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_224
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_225
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_226
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_227
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_228
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_229
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_230
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_231
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_232
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_233
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_234
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_235
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_236
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_237
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_238
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_239
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_240
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_241
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_242
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_243
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_244
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_245
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_246
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_247
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_248
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_249
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_250
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_251
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_252
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_253
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_254
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_255
};
#endif // RICONS_IMPLEMENTATION