GithubHelp home page GithubHelp logo

Issues about nuklear HOT 9 CLOSED

ktb92677 avatar ktb92677 commented on May 22, 2024
Issues

from nuklear.

Comments (9)

vurtun avatar vurtun commented on May 22, 2024

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.

ktb92677 avatar ktb92677 commented on May 22, 2024

I've literally just copied and pasted your win32 example into the MinGW compiler. in reference to number 4.

from nuklear.

vurtun avatar vurtun commented on May 22, 2024

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.

ktb92677 avatar ktb92677 commented on May 22, 2024

Oh cool! Do you think you could quickly show me what the fix is before you push it live?

from nuklear.

vurtun avatar vurtun commented on May 22, 2024

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.

ktb92677 avatar ktb92677 commented on May 22, 2024

I can confirm everything is working now!

Have you looked into the scroll bar issue?

from nuklear.

vurtun avatar vurtun commented on May 22, 2024

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.

dumblob avatar dumblob commented on May 22, 2024

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.

vurtun avatar vurtun commented on May 22, 2024

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)

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.