raygui/README.md

92 lines
2.9 KiB
Markdown
Raw Normal View History

2018-02-12 12:20:15 +01:00
<img align="left" src="logo/raygui_256x256.png" width=256>
2017-07-02 13:37:07 +02:00
2019-04-29 10:13:36 +02:00
**raygui** is a simple and easy-to-use immediate-mode-gui library.
2016-09-07 18:25:06 +02:00
2018-07-21 13:47:07 +02:00
raygui was initially inspired by [Unity IMGUI](https://docs.unity3d.com/Manual/GUIScriptingGuide.html) (immediate mode GUI API).
2016-09-07 18:25:06 +02:00
2018-02-12 12:20:15 +01:00
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, raylib default font...).
2017-06-21 01:19:38 +02:00
2019-06-04 17:00:14 +02:00
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), [rGuiStyler](https://raylibtech.itch.io/rguistyler) and [rGuiLayout](https://raylibtech.itch.io/rguilayout).
2017-08-06 10:58:09 +02:00
2018-07-21 13:47:07 +02:00
<br>
2019-08-28 11:54:36 +02:00
## raygui provided controls
2017-06-21 01:19:38 +02:00
2018-05-02 21:09:18 +02:00
#### Container/separator controls, useful for controls organization
2018-05-03 00:48:46 +02:00
2018-05-02 21:09:18 +02:00
- WindowBox
- GroupBox
- Line
- Panel
2018-05-02 23:48:31 +02:00
2018-05-02 23:51:13 +02:00
#### Basic controls
2018-05-03 00:31:49 +02:00
2019-08-28 11:54:36 +02:00
<img align="right" src="images/raygui_controls_panel.png">
2018-05-03 00:31:49 +02:00
2016-09-07 18:25:06 +02:00
- Label
- Button
2018-02-12 12:20:15 +01:00
- LabelButton
- ImageButton
2019-01-11 15:27:31 +01:00
- Toggle
2016-09-07 18:25:06 +02:00
- ToggleGroup
- CheckBox
2017-06-21 01:19:38 +02:00
- ComboBox
2018-05-02 21:09:18 +02:00
- DropdownBox
2018-02-12 12:20:15 +01:00
- TextBox
2019-01-11 15:27:31 +01:00
- TextBoxMulti
- ValueBox
- Spinner
2016-09-07 18:25:06 +02:00
- Slider
- SliderBar
- ProgressBar
2018-05-02 21:09:18 +02:00
- StatusBar
2019-06-04 17:00:14 +02:00
- ScrollBar
2019-01-11 15:27:31 +01:00
- ScrollPanel
2018-05-02 21:09:18 +02:00
- DummyRec
2019-08-24 21:06:51 +02:00
- Grid
2018-05-02 21:09:18 +02:00
2018-05-02 23:51:13 +02:00
#### Advance controls
2018-02-12 12:20:15 +01:00
- ListView
- ColorPicker
2019-06-04 17:00:14 +02:00
- MessageBox
2019-08-24 21:06:51 +02:00
- TextInputBox
2019-08-28 11:54:36 +02:00
## raygui styles
raygui comes with a [default](styles/default) style automatically loaded at runtime:
![raygui default style](styles/default/style_table.png)
Some additional styles are also provided for convenience, just check [styles directory](styles) for details:
![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.
Styles can be loaded at runtime using raygui `GuiLoadStyle()` function. Simple and easy-to-use.
## raygui icons: ricons
`raygui` includes a separate module with a set of custom handcrafter icons, ready to be used and integrated in a easy way with `raygui`. This module is called `ricons.h` and can be automatically included just defining `RAYGUI_SUPPORT_RICONS` before including `raygui`.
<img align="right" src="images/raygui_ricons.png">
```c
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_SUPPORT_RICONS
#include "raygui.h"
```
To use any of those icons in your gui, just preprend *iconId* to any text written within `raygui` controls:
```c
if (GuiButton(rec, "#05#Open Image") { /* ACTION */ }
```
or use the provided `GuiIconText()` function to prepend it automatically, using a clearer identifier.
```c
if (GuiButton(rec, GuiIconText(RICON_FILE_OPEN, "Open Image"))) { /* ACTION */ }
```
2016-09-07 18:25:06 +02:00
2019-08-24 21:06:51 +02:00
license
-------
2016-09-07 18:25:06 +02:00
2019-08-24 21:06:51 +02:00
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.md) for further details.