Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing texture generator #9

Closed
eloraiby opened this issue Apr 30, 2019 · 2 comments
Closed

Missing texture generator #9

eloraiby opened this issue Apr 30, 2019 · 2 comments

Comments

@eloraiby
Copy link

First thanks for microui, I am using it as debugging interface for my little app. I noticed that it's missing a way to generate the texutre used for the demo. I believe you have used the atlas code to do that, but the steps needed are missing. Could you please add them in the READM.md file ?

On a side note, is there a reason for choosing the supply Id based on hashed pointers rather than simple id increments ? This forces the pointers to reference memory allocated on heap, and would break the logic if they are allocated on stack.

@rxi
Copy link
Owner

rxi commented Apr 30, 2019

The atlas was generated using this with the following options:

  -f "  atlas[%s] = mu_rect(%d, %d, %d, %d);"\
  -g "%s+%d"\
  -p 1\
  -r 32-127\
  -s 16

The input directory should contain a .png file for each icon with the name of that icon's enum (eg: MU_ICON_CLOSE.png), a font named ATLAS_FONT.ttf and an entirely white 3x3 png named ATLAS_WHITE.png.

That being said the atlas and rendering code used in the demo program are meant only to be used for the purpose of the demo program. For real use you're expected to bring your own text, icon and rectangle rendering.

Regarding the IDs, if I understand what you mean correctly: this would not work, as removing or adding controls between frames would cause every control after to have an ID different to the previous frame. A practical example of this being an issue would be a console window with logged text at the top and an input box at the bottom, if new text were logged the input box would acquire a new ID -- in the case of it having focus it would lose focus when this happens.

@rxi rxi mentioned this issue Jul 30, 2019
@rxi rxi closed this as completed Feb 25, 2020
@0xtrzy
Copy link

0xtrzy commented May 11, 2020

in my language i use ŁÓźĄżć
this glyph exist in font but this is not in range.
is possible add list of glyph and range in options?

How generating *.inl file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants