Comments (4)
Hi @Demizdor!
Actually, rIcons
is the result of a personal need, as you probably know, I'm working in the development of a small set of tools (rFXGen is one of them) and after doing some tests, I realized that, adding some icons to the controls improved a lot the visual style. I also wanted a custom and personal style for those icons (following raylib/raygui minimalist style), so, I created the rIcons
. Benefits of rIcons
for raygui in comparison to other options:
rIcons
follow raylib/raygui minimalist style, allowing out-of-the-box creation of similar style tools.rIcons
provide a quite complete set of icons, when designing tools, it could be difficult to find all the icons you need with the same style/size and most of the time selecting those icons, organizing them, catalogue them, rename, copying, loading files is a complete nightmare.rIcons
is embedded with raygui, no external dependencies required, all icons are compiled with the user tool and memory footprint is really low.rIcons
only require aDrawRectangle()
function (orDrawPixel()
or similar) to be drawn, no image/texture loading/unloading required, neither graphic context management, it makes the library extremely portable to any engine (almost drag & drop).- Current implementation do not require any additional parameter to any existing control (I always try to keep function parameters low, as much as possible). Icons can be just created with a small icon code along the text, it's really comfortable.
GuiImageButton()
allows passing a Texture2D and a rectangle but this implementation is not really portable, it's quite dependant on the engine/framework used and it also requires longer function with extra parameter just for one type of control. Adapting that same behaviour to all controls will require a complete redesign...rIcons
solves that.
Also, current implementation could be extended to support icons as codepoints (requiring a font including those icons) and also allowing users to create they own rIcons
, a tool is already being designed.
from raygui.
Hi @raysan5, here are my thoughts on this
-
Maybe i'm missing something about
rIcons
but i don't see the usefulness of the current implementation ...what is the goal here? to have icons drawn before or after the text?.. if that is the case then why not allow the user to pass a texture to a control maybe with array of rects for multiple icons !? Or why not implement a better UTF8 support and inject therIcons
as codepoints into the PUA or allow the user to inject own icons in there?
Now please don't take this the wrong way, i'm not trying to discredit your work, you worked hard on these and it shows, the icons are all lovely ❤️
Like i said maybe i'm missing something! -
TEXT_ALIGNMENT
is very useful i think -
removing
GuiImageButton()
will be a bad idea in my oppinion...how else to add your own icon to a button.. this will limit the user solely to the icons provided byrIcons
. -
GuiTextBox()
,GuiTextBoxMulti()
made some progress, implemented caret positioning inGuiTextBox()
...lack of free time means this will take some time sorry!
-
GuiListViewEx()
i'm still confident that using scissor area is the best solution for this.. i mean we can be smart about it and don't draw all the elements just the elements that need to be drawn those betweenstartIndex
andendIndex
as they are named in current implementation.
from raygui.
Hey, thanks for writing such a detailed response, i appreciate it. Seems you thought very hard about all of this.
Good job!
from raygui.
Added SOL notes on the main description.
from raygui.
Related Issues (20)
- Calling GuiLoadStyle() with enefete/sunny causes assertion fail in raylib HOT 1
- `GuiColorBarHue` bug when selecting a color HOT 5
- `GuiToggle()` always returns 0 HOT 6
- Multiple `GuiTextInputBox()` not supported HOT 2
- [`rGuiStyler`] Support for substepping font rasterization HOT 3
- examples build issue HOT 1
- `GuiButton()` not considering mouse state as exclusive mode HOT 2
- Dynamic depth management HOT 4
- Input blocking / input event consuming HOT 2
- [Feature Request] Keyboard Navigation HOT 2
- Error - cannot convert bool* to int* HOT 1
- [Feature Request] Accessibility support? HOT 5
- Problem with Installation HOT 1
- Problem when define HOT 2
- Documentation on the `rgs` format HOT 2
- Issue with Unicode input on `GuiTextBox()` HOT 1
- Compile for Rapberry Pi 2B HOT 3
- Raspberry Pi - touch does not works. HOT 3
- Define a consistent convention on controls return values
- missing .c file in src ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raygui.