GithubHelp home page GithubHelp logo

Comments (4)

raysan5 avatar raysan5 commented on May 18, 2024 1

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 a DrawRectangle() function (or DrawPixel() 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.

Demizdor avatar Demizdor commented on May 18, 2024

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 the rIcons 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 by rIcons.

  • GuiTextBox(), GuiTextBoxMulti() made some progress, implemented caret positioning in GuiTextBox() ...lack of free time means this will take some time sorry!
    caret_pos_test

  • 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 between startIndex and endIndex as they are named in current implementation.

from raygui.

Demizdor avatar Demizdor commented on May 18, 2024

Hey, thanks for writing such a detailed response, i appreciate it. Seems you thought very hard about all of this.

Good job!

from raygui.

raysan5 avatar raysan5 commented on May 18, 2024

Added SOL notes on the main description.

from raygui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.