Comments (9)
Hey,
1.) Unused variables
These previously had more zero check logic to it but it was moved higher up in the function so they are left overs and I removed them.
2.) Helper macros
Yeah stupid mistake, I copied each macro into each platform instead of placing them in the demo.c file. Should be fixed now
3.) Scrollbars
Up to this point I never had problems with scrolling but I can take a look at it tomorrow.
4.) Backspace
Which platform do you use for input? SDL, or directly over win32 or other, that would at least narrow done the problem, since at the moment I have no idea why that is. Will probably have to check that out tomorrow as well.
from nuklear.
I've literally just copied and pasted your win32 example into the MinGW compiler. in reference to number 4.
from nuklear.
Ah OK, that makes sense I just saw that I forgot to update win32 input handling to this library version. So it shouldn't be to much trouble to fix the problem.
from nuklear.
Oh cool! Do you think you could quickly show me what the fix is before you push it live?
from nuklear.
OK I fixed the backspace and key behavior. The problem was that I checked the wrong parameter in win32's MSG struct in the key function. I checked msg->lParam
but should have checked
msg->wParam
. In addition the check inside the text function was wrong I used && instead of ||. So just some stupid mistakes.
from nuklear.
I can confirm everything is working now!
Have you looked into the scroll bar issue?
from nuklear.
I looked at the scrollbar problem and things got a little bit more complicated. The reason why the scrollbar behaves like it does is because I don't want to store another flag with each scrollbar. Since each window and more importantly subwindows (popups, groups, shelfs ...) would all need another variable that needs to be stored by the user. This is generally a problem with dragging in my library which would have to be based on permanent dragging state. But in general up to this point I never had problems with scrolling, especially since you can still scroll by mouse (at least in windows).
In general there are some more cases in this library with this kind of problem for example text that spans over the editbox bounds uses frames instead of scrolling to move to the left and a few other smaller cases which are hard to handle since everything can change and almost no state is stored.
There would be a solution to fix and get all this and other things that bother me with this library right but it would require to rewrite everything (2-4kLoc) except the base (buffer, commands, vertex buffer, font handling, editbuffer). In general I would have no problem doing exactly that but I would have to totally rewrite and change the API, a lot of really hard to get right parts of the library like window and all subwindow handling and explore and iterate a lot. While even all that would not really bother me the fact that I worked on it for 7-10 month does, at least at the moment I just want to fix bugs that come up and learn and explore other things. I will probably come back in the future and fork this library and try to do all that but at the moment I am just tired of all these complete rewrites.
from nuklear.
at the moment I am just tired of all these complete rewrites.
That's completely understandable. You did a great job! Thanks a lot!
I'll try to promote Zahnrad everywhere, where possible, because I see a great opportunity in the future (be it Zahnrad, or rather the new fork with the mentioned issues solved).
from nuklear.
Scroll bar is a little bit glitchy. It only scrolls up and down when the mouse is exactly over it. There should be a bit of wiggle room.
OK I found a solution (more like a hack) to fix the the scrollbar behavior. I use the input structure to update the clicked position with the cursor movement which works nicely and as so far no downside the user input behavior. Biggest downside is of course that I have to remove const correctness for the input struct inside the context/window but I think it is worth it.
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.