diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-11-07 14:19:02 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-11-07 14:19:02 -0800 |
commit | 95e1a756fbb6aa07e9957417bc7dd1c117cda812 (patch) | |
tree | 3fb0553175319cefe2a266cea0134cf17973c11d /nuklear_ui | |
parent | 37fa7d1e0f029dd95cc204a6145de6e58f992c5e (diff) |
Show current path in file browser
Diffstat (limited to 'nuklear_ui')
-rw-r--r-- | nuklear_ui/blastem_nuklear.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nuklear_ui/blastem_nuklear.c b/nuklear_ui/blastem_nuklear.c index f782404..3b770f6 100644 --- a/nuklear_ui/blastem_nuklear.c +++ b/nuklear_ui/blastem_nuklear.c @@ -98,7 +98,8 @@ void view_file_browser(struct nk_context *context, uint8_t normal_open) if (nk_begin(context, "Load ROM", nk_rect(0, 0, width, height), 0)) { nk_layout_row_static(context, height - context->style.font->height * 3, width - 60, 1); int32_t old_selected = selected_entry; - if (nk_group_begin(context, "Select ROM", NK_WINDOW_BORDER | NK_WINDOW_TITLE)) { + char *title = alloc_concat("Select ROM: ", current_path); + if (nk_group_begin(context, title, NK_WINDOW_BORDER | NK_WINDOW_TITLE)) { nk_layout_row_static(context, context->style.font->height - 2, width-100, 1); for (int32_t i = 0; i < num_entries; i++) { @@ -118,6 +119,7 @@ void view_file_browser(struct nk_context *context, uint8_t normal_open) } nk_group_end(context); } + free(title); nk_layout_row_static(context, context->style.font->height * 1.75, width > 600 ? 300 : width / 2, 2); if (nk_button_label(context, "Back")) { pop_view(); |