readme fail
This commit is contained in:
parent
dbfbc784cb
commit
3a225b6fd9
39
Readme.md
39
Readme.md
@ -27,20 +27,6 @@ over the panel management and therefore needs the most amount of internal state.
|
|||||||
Each higher level level of astraction uses the lower level(s) internally to build
|
Each higher level level of astraction uses the lower level(s) internally to build
|
||||||
on but offers mostly a different API.
|
on but offers mostly a different API.
|
||||||
|
|
||||||
### Widgets
|
|
||||||
|
|
||||||
### Panels
|
|
||||||
|
|
||||||
### Context
|
|
||||||
|
|
||||||
## Memory
|
|
||||||
|
|
||||||
## Input
|
|
||||||
|
|
||||||
## Output
|
|
||||||
|
|
||||||
## Font
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
While the widgets layer offers the most configuration and even expects you to
|
While the widgets layer offers the most configuration and even expects you to
|
||||||
configure each and every widget, the upper levels provide you with a basic set of
|
configure each and every widget, the upper levels provide you with a basic set of
|
||||||
@ -48,31 +34,12 @@ configurable attributes like color, padding and spacing.
|
|||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### Is this project stable?
|
|
||||||
The basic API is stable while the needed backend may change. For example the draw
|
|
||||||
command backend will probably be changed to support primitives instead of
|
|
||||||
just using triangles with textures. Which would simplify the library a whole lot
|
|
||||||
while providing more freedom and control to the user.
|
|
||||||
|
|
||||||
### Where is widget X?
|
### Where is widget X?
|
||||||
A number of basic widgets are provided but some of the more complex widgets like
|
A number of basic widgets are provided but some of the more complex widgets like
|
||||||
comboboxes, tables and tree views are not yet implemented. Maybe if I have more
|
comboboxes, tables and tree views are not yet implemented. Maybe if I have more
|
||||||
time I will look into adding them, except for comboboxes which are just
|
time I will look into adding them, except for comboboxes which are just
|
||||||
discusting to implement.
|
discusting to implement.
|
||||||
|
|
||||||
### Why should I use this library over ImGui
|
|
||||||
You probably shouldn't since ImGui provides a lot more features, better
|
|
||||||
support and more polish. That being said ImGui is C++ and not C and
|
|
||||||
therefore for people who exclusivly only use C not interesting. Furthermore
|
|
||||||
while ImGui provides a way more bloat free expierence than most classic
|
|
||||||
non immediate mode GUIs, it still focuses on unneeded global hidden state.
|
|
||||||
And finally the biggest difference between this project and ImGui is the
|
|
||||||
flexible selection of abstraction provided by this project. That beeing said I
|
|
||||||
still think the ImGui team did a great job of providing a good
|
|
||||||
immedate mode GUI that I don't activily try compete against since the
|
|
||||||
contributors of ImGUI are a.) alot more contributers and b.) probably have more
|
|
||||||
programming expierence than I do.
|
|
||||||
|
|
||||||
### Why did you use ANSI C and not C99 or C++?
|
### Why did you use ANSI C and not C99 or C++?
|
||||||
Personally I stay out of all "discussions" about C vs C++ since they are totally
|
Personally I stay out of all "discussions" about C vs C++ since they are totally
|
||||||
worthless and never brought anything good with it. The simple answer is I
|
worthless and never brought anything good with it. The simple answer is I
|
||||||
@ -93,12 +60,6 @@ I defined my own types which need to be set to the correct size for each
|
|||||||
plaform. But if your development environment provides the header you can define
|
plaform. But if your development environment provides the header you can define
|
||||||
`GUI_USE_FIXED_SIZE_TYPES` to directly use the correct types.
|
`GUI_USE_FIXED_SIZE_TYPES` to directly use the correct types.
|
||||||
|
|
||||||
### Why do you use Freetype? I thought there are no direct dependencies?
|
|
||||||
Freefont is no direct dependency and is only used if you specifically import
|
|
||||||
the library by defining `GUI_USE_FRETYPE_FONT`. The main reason I even added
|
|
||||||
freetype was to have a basic easy way to test out the library without having to
|
|
||||||
manage font handling.
|
|
||||||
|
|
||||||
## References
|
## References
|
||||||
- [Tutorial from Jari Komppa about imgui libraries](http://www.johno.se/book/imgui.html)
|
- [Tutorial from Jari Komppa about imgui libraries](http://www.johno.se/book/imgui.html)
|
||||||
- [Johannes 'johno' Norneby's article](http://iki.fi/sol/imgui/)
|
- [Johannes 'johno' Norneby's article](http://iki.fi/sol/imgui/)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
#define MAX_BUFFER 64
|
#define MAX_BUFFER 64
|
||||||
#define MAX_MEMORY (8 * 1024)
|
#define MAX_MEMORY (16 * 1024)
|
||||||
#define MAX_DEPTH 8
|
#define MAX_DEPTH 8
|
||||||
#define MAX_PANEL 4
|
#define MAX_PANEL 4
|
||||||
#define WIN_WIDTH 800
|
#define WIN_WIDTH 800
|
||||||
@ -457,8 +457,6 @@ demo_panel(struct gui_context *ctx, struct gui_panel *panel, struct demo *demo)
|
|||||||
demo->item_cur = gui_panel_selector(&demo->group, items, LEN(items), demo->item_cur);
|
demo->item_cur = gui_panel_selector(&demo->group, items, LEN(items), demo->item_cur);
|
||||||
demo->in_act = gui_panel_input(&demo->group, demo->in_buf, &demo->in_len,
|
demo->in_act = gui_panel_input(&demo->group, demo->in_buf, &demo->in_len,
|
||||||
MAX_BUFFER, GUI_INPUT_DEFAULT, demo->in_act);
|
MAX_BUFFER, GUI_INPUT_DEFAULT, demo->in_act);
|
||||||
demo->in_act = gui_panel_input(&demo->group, demo->in_buf, &demo->in_len,
|
|
||||||
MAX_BUFFER, GUI_INPUT_DEFAULT, demo->in_act);
|
|
||||||
if (gui_panel_shell(&demo->group, demo->cmd_buf, &demo->cmd_len, MAX_BUFFER, &demo->cmd_act))
|
if (gui_panel_shell(&demo->group, demo->cmd_buf, &demo->cmd_len, MAX_BUFFER, &demo->cmd_act))
|
||||||
fprintf(stdout, "shell executed!\n");
|
fprintf(stdout, "shell executed!\n");
|
||||||
gui_panel_group_end(panel, &demo->group);
|
gui_panel_group_end(panel, &demo->group);
|
||||||
@ -525,10 +523,11 @@ main(int argc, char *argv[])
|
|||||||
panel = gui_new_panel(ctx, 50, 50, 500, 320, &config, &font);
|
panel = gui_new_panel(ctx, 50, 50, 500, 320, &config, &font);
|
||||||
|
|
||||||
memset(&demo, 0, sizeof(demo));
|
memset(&demo, 0, sizeof(demo));
|
||||||
demo.tab.minimized = gui_true;
|
demo.tab.minimized = gui_false;
|
||||||
demo.spinner = 250;
|
demo.spinner = 250;
|
||||||
demo.slider = 2.0f;
|
demo.slider = 2.0f;
|
||||||
demo.prog = 60;
|
demo.prog = 60;
|
||||||
|
demo.current = 1;
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
/* Input */
|
/* Input */
|
||||||
|
Loading…
Reference in New Issue
Block a user