{"id":16186917,"url":"https://github.com/robloach/nuklear_console","last_synced_at":"2025-03-19T03:30:34.522Z","repository":{"id":227232374,"uuid":"770764210","full_name":"RobLoach/nuklear_console","owner":"RobLoach","description":"Console-like user interface for Nuklear with gamepad, keyboard or mouse support","archived":false,"fork":false,"pushed_at":"2024-04-28T06:49:32.000Z","size":613,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-28T08:28:54.021Z","etag":null,"topics":["header-only","nuklear"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobLoach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-12T05:45:50.000Z","updated_at":"2024-05-30T03:51:08.151Z","dependencies_parsed_at":"2024-03-12T09:55:44.702Z","dependency_job_id":"4094c9b7-eee6-4c0e-b002-5ef0fd504c5f","html_url":"https://github.com/RobLoach/nuklear_console","commit_stats":null,"previous_names":["robloach/nuklear_console"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fnuklear_console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fnuklear_console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fnuklear_console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobLoach%2Fnuklear_console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobLoach","download_url":"https://codeload.github.com/RobLoach/nuklear_console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244350610,"owners_count":20439283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["header-only","nuklear"],"created_at":"2024-10-10T07:19:50.155Z","updated_at":"2025-03-19T03:30:34.517Z","avatar_url":"https://github.com/RobLoach.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nuklear_console\n\nConsole-like user interface for [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) with [gamepad](https://github.com/robloach/nuklear_gamepad), keyboard, and mouse support.\n\n![nuklear_console_demo Screenshot](demo/common/nuklear_console_demo.gif)\n\n## Usage\n\n``` c\n#define NK_IMPLEMENTATION\n#include \"nukear.h\"\n\n// Gamepad support https://github.com/robloach/nuklear_gamepad\n#define NK_GAMEPAD_IMPLEMENTATION\n#include \"nuklear_gamepad.h\"\n\n#define NK_CONSOLE_IMPLEMENTATION\n#include \"nuklear_console.h\"\n\nint main() {\n    // Set up the console within the Nuklear context\n    nk_console* console = nk_console_init(ctx);\n\n    // Add some widgets\n    nk_console_button(console, \"New Game\");\n    nk_console* options = nk_console_button(console, \"Options\");\n    {\n        nk_console_button(options, \"Some cool option!\");\n        nk_console_button(options, \"Option #2\");\n        nk_console_button_onclick(options, \"Back\", nk_console_button_back);\n    }\n    nk_console_button(console, \"Load Game\");\n    nk_console_button(console, \"Save Game\");\n\n    // Render the console in a window\n    nk_console_render_window(console, \"nuklear_console\", nk_rect(0, 0, 400, 300), NK_WINDOW_TITLE);\n\n    // Clean it up\n    nk_console_free(console);\n\n    return 0;\n}\n```\n\n## Widgets\n\nButtons, Checkboxes, Color Select, Comboboxes, Files, Directories, Gamepad Input Buttons, Labels, Properties, Sliders, Knobs, Radio Options, Images, Knob, Rows, TextEdit, Messages.\n\n## API\n\n``` c\n// Console\nnk_console* nk_console_init(struct nk_context* context);\nvoid nk_console_free(nk_console* console);\nvoid nk_console_render(nk_console* console);\nvoid nk_console_render_window(nk_console* console, const char* title, struct nk_rect bounds, nk_uint flags);\n\n// Widgets\nnk_console* nk_console_button(nk_console* parent, const char* text);\nnk_console* nk_console_checkbox(nk_console* parent, const char* text, nk_bool* active);\nnk_console* nk_console_color(nk_console* parent, const char* label, struct nk_colorf* color, enum nk_color_format format);\nnk_console* nk_console_combobox(nk_console* parent, const char* label, const char *items_separated_by_separator, int separator, int* selected);\nnk_console* nk_console_label(nk_console* parent, const char* text);\nnk_console* nk_console_progress(nk_console* parent, const char* text, nk_size* current, nk_size max);\nnk_console* nk_console_property_int(nk_console* parent, const char* label, int min, int *val, int max, int step, float inc_per_pixel);\nnk_console* nk_console_property_float(nk_console* parent, const char* label, float min, float *val, float max, float step, float inc_per_pixel);\nnk_console* nk_console_slider_int(nk_console* parent, const char* label, int min, int* val, int max, int step);\nnk_console* nk_console_slider_float(nk_console* parent, const char* label, float min, float* val, float max, float step);\nnk_console* nk_console_radio(nk_console* parent, const char* label, int* selected);\nnk_console* nk_console_row_begin(nk_console* parent);\nvoid nk_console_row_end(nk_console* console);\nnk_console* nk_console_textedit(nk_console* parent, const char* label, char* buffer, int buffer_size);\nnk_console* nk_console_file(nk_console* parent, const char* label, char* file_path_buffer, int file_path_buffer_size);\nnk_console* nk_console_input(nk_console* parent, const char* label, int gamepad_num, int* out_gamepad_num, enum nk_gamepad_button* out_gamepad_button);\nvoid nk_console_show_message(nk_console* console, const char* text);\n\n// Utilities\nvoid nk_console_button_back(nk_console* button);\nnk_console* nk_console_button_onclick(nk_console* parent, const char* text, void (*onclick)(struct nk_console*));\nnk_console* nk_console_get_top(nk_console* widget);\nint nk_console_get_widget_index(nk_console* widget);\nvoid nk_console_check_tooltip(nk_console* console);\nvoid nk_console_check_up_down(nk_console* widget, struct nk_rect bounds);\nnk_bool nk_console_is_active_widget(nk_console* widget);\nvoid nk_console_set_active_parent(nk_console* new_parent);\nvoid nk_console_set_active_widget(nk_console* widget);\n```\n\n## Dependencies\n\n- C99+\n- [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear)\n- [nuklear_gamepad](https://github.com/robloach/nuklear_gamepad)\n- [c-vector](https://github.com/eteran/c-vector/)\n\n## Development\n\nUse [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to apply coding standards.\n``` sh\nclang-format -i *.h\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobloach%2Fnuklear_console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobloach%2Fnuklear_console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobloach%2Fnuklear_console/lists"}