Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void
- file_manager(int width, int height, struct nk_context *ctx)
- {
- if (nk_begin(ctx, "File Manager", nk_rect(0, 0, width, height ),
- NK_WINDOW_NO_SCROLLBAR))
- {
- nk_layout_row_dynamic(ctx, height - 48, 2); /* todo figure out why there is border padding */
- if (nk_group_begin(ctx, "File Tree", NK_WINDOW_BORDER))
- {
- if (nk_tree_push(ctx, NK_TREE_NODE, "/", NK_MAXIMIZED))
- {
- if (nk_tree_push(ctx, NK_TREE_NODE, "/bin", NK_MAXIMIZED))
- {
- nk_layout_row_dynamic(ctx, 30, 1);
- nk_label(ctx, "file 1", NK_TEXT_ALIGN_LEFT);
- nk_label(ctx, "file 2", NK_TEXT_ALIGN_LEFT);
- nk_label(ctx, "file 3", NK_TEXT_ALIGN_LEFT);
- nk_label(ctx, "file 4", NK_TEXT_ALIGN_LEFT);
- nk_tree_pop(ctx);
- }
- nk_layout_row_dynamic(ctx, 30, 1);
- nk_label(ctx, "dhtt", NK_TEXT_ALIGN_LEFT);
- nk_tree_pop(ctx);
- }
- nk_group_end(ctx);
- }
- if (nk_group_begin(ctx, "column2", NK_WINDOW_BORDER)) {
- nk_layout_row_dynamic(ctx, 30, 1);
- nk_label(ctx, "file 1", NK_TEXT_CENTERED);
- nk_layout_row_dynamic(ctx, 30, 1);
- nk_label(ctx, "file 2", NK_TEXT_CENTERED);
- nk_group_end(ctx);
- }
- /* command prompt section */
- nk_layout_row_static(ctx, 30, width, 1);
- if (nk_group_begin(ctx, "command prompt", NK_WINDOW_BORDER))
- {
- nk_label(ctx, "ls /", NK_TEXT_ALIGN_LEFT);
- nk_group_end(ctx);
- }
- };
- nk_end(ctx);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement