Comments (3)
Hey,
thanks for your feedback. I was not sure if it is possible but I had an idea so I tested it out
and it seems to work. But for this to work you have to use zr_edit
and not provide a
cursor by just passing NULL
. The more complex zr_edit_box
and zr_edit_field
do not work
since the modification between frames is not extractable outside the function.
In addition you have to provide an additional buffer with the same size to copy the
placeholder symbol into (this can be any character you want even unicode characters like ⚫
)
After the box was updated you just have to check for the changes and if anything was added just
add it to your password buffer.
/* frame persistent data */
static char password[16];
static size_t length;
static int active;
/* password edit */
size_t i = 0;
char buffer[16];
size_t old_len = length;
for (i = 0; i < length; ++i) buffer[i] = '*';
zr_edit(&layout, password, &length, 16, &active, NULL, ZR_INPUT_DEFAULT);
if (old_len < length)
memcpy(&password[old_len], &buffer[old_len], length - old_len);
from nuklear.
Thank you so much for the reply! It helped a lot, I was able to use your example and adapt it and get it to work! Thanks again
from nuklear.
Glad that I could help. I will close the issue then.
from nuklear.
Related Issues (20)
- Documentation link to the rawgit.com is Supposed to stop Working in 2019_10 HOT 3
- Change the whole library to not use any null-terminated strings HOT 6
- Layouting using groups HOT 14
- Internal drawing bug HOT 2
- Nuklear render on hooked d3d9 app breaks when app displays a tooltip
- (Question) images in nuklear HOT 2
- NK_EDIT_GOTO_END_ON_ACTIVATE not working with nk_edit_string_zero_terminated
- Examples won't compile on macOS because it doesn't have pkg-config by default. HOT 1
- Rendering to a framebuffer instead of OpenGL HOT 10
- GLFW adapter not drawing Properly HOT 1
- combined character displaying each as different character
- Image created in memory triggers "if this triggers you forgot to add a font" HOT 1
- When I update the nk_begin title it blocks the entire window.
- Get rid of scissors?
- the GDI+ version make the nk_button_color draw the rectangle with inner black lines
- Suggestion: Center docs
- Option for component shadow
- Segmentation failed to try nk_style_set_font in the glfw_opengl3 demo HOT 1
- How to know if a edit_string is active or not ? HOT 1
- ALL DEVELOPMENT MOVED ELSEWHERE
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 nuklear.