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

Hell o world #369

Closed
jackghg opened this issue Dec 8, 2021 · 12 comments
Closed

Hell o world #369

jackghg opened this issue Dec 8, 2021 · 12 comments

Comments

@jackghg
Copy link

jackghg commented Dec 8, 2021

I see that you failed to provide an hello world example, and I can see why. In the sample on the readme you omitted the font hell that you must do. I hope its temporary. The default font and size should be automatic, and there should be an optional function like setdefaultfont( path, size ) and setdefaultfont( name, size ).

@dumblob
Copy link
Member

dumblob commented Dec 8, 2021

PRs are very well welcome.

Btw. glance over our review micro-guideline at the end of our readme.md to know what a PR might (shall?) look like 😉.

@jackghg
Copy link
Author

jackghg commented Dec 9, 2021

I just cant make this work. There should be an helloworld example for every backend.

@RobLoach
Copy link
Contributor

The main.c for each demo has a pretty good example...
https://github.com/Immediate-Mode-UI/Nuklear/blob/master/demo/sdl_opengl2/main.c

Go to that directory, and use make

@jackghg
Copy link
Author

jackghg commented Dec 20, 2021

nuklear is a bit too much low level for me :|

@dumblob
Copy link
Member

dumblob commented Dec 20, 2021

nuklear is a bit too much low level for me :|

That's why there are high-level bindings (e.g. Python bindings should be very easy to use) - see our readme and wiki (under "Integrations").

But if you have any suggestions how to make Nuklear (or bindings) higher-level, we're all ears 😉. Contributions also very much welcome!

@jackghg
Copy link
Author

jackghg commented Dec 20, 2021

But if you have any suggestions

yes: make the "/* init gui state */" part in the readme example automatic

Also I had a look at the Xorg backend, and look a lot like Xlib, it look more like half of a uitk

@dumblob
Copy link
Member

dumblob commented Dec 20, 2021

But if you have any suggestions

yes: make the "/* init gui state */" part in the readme example automatic

You mean to provide an example in a language which doesn't require variable declaration? E.g. Python (there are of course Nuklear Python bindings)? In Python you wouldn't need an explicit "init state" section.

Note, the init section in readme is not Nuklear-specific - it's just variables you want to use for your data (not Nuklear's data). So Nuklear can't cut down on it - that's why I understand your suggestion as using a different language which does the init "behind the scenes" as e.g. Python does.

Do I understand you correctly?

Also I had a look at the Xorg backend, and look a lot like Xlib, it look more like half of a uitk

Yep, you read it correctly - a backend has nothing to do with how Nuklear is being used by programmers and is ~100% specific to the given backend (e.g. Xorg backend is of course 100% Xlib).

@jackghg
Copy link
Author

jackghg commented Dec 20, 2021

You mean to provide an example in a language which doesn't require...

No, there should be a complete hello world for c in the readme, and 1 for all the languages in the docs.
What i was saying now, is that the initialization should be automatized for all the languages.

Yep, you read it correctly - a backend has nothing to do...

No, I dont mean the backend source code, I mean the code needed to use/initialize nuklear.
Rob sayd that the main.c files are examples, so I looked the file: /demo/x11/main.c and it look very low level, xlib. too low level.

@RobLoach
Copy link
Contributor

That would be a very long README. Each language binding has its own implementation and needs. Which language are you most familiar with?

@RobLoach
Copy link
Contributor

If you're still looking to use C, but want something a bit more higher level, raylib is actually pretty nice. I made some bindings for it over at https://github.com/RobLoach/raylib-nuklear

@jackghg
Copy link
Author

jackghg commented Dec 22, 2021

If you're still looking to use C, but want something a bit more higher level, raylib is actually pretty nice. I made some bindings for it over at https://github.com/RobLoach/raylib-nuklear

yes, something like that, reduce the number of lines needed to initialize, from 100 to 1.
Even if, in that raylib, where do you pick the backend ?

@RobLoach
Copy link
Contributor

Even if, in that raylib, where do you pick the backend ?

Raylib is the backend in that case. Use whichever framework you're most familiar with 😉

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