diff options
author | Michael Pavone <pavone@retrodev.com> | 2018-02-07 19:21:44 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2018-02-07 19:21:44 -0800 |
commit | 94b11b186fa4cf46c64bc3fad55f74c7b5096ffe (patch) | |
tree | b0c4aa038ce45ed85b7513da8104b1e5b2496e85 | |
parent | eae5c0b52cb94efd6b5d989883e79bd9efb38111 (diff) |
Filled in About view
--HG--
branch : nuklear_ui
-rw-r--r-- | nuklear_ui/blastem_nuklear.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/nuklear_ui/blastem_nuklear.c b/nuklear_ui/blastem_nuklear.c index 367893d..715eb9f 100644 --- a/nuklear_ui/blastem_nuklear.c +++ b/nuklear_ui/blastem_nuklear.c @@ -136,6 +136,53 @@ void view_lock_on(struct nk_context *context) void view_about(struct nk_context *context) { + const char *lines[] = { + "BlastEm v0.6.0", + "Copyright 2012-2017 Michael Pavone", + "", + "BlastEm is a high performance open source", + "(GPLv3) Genesis/Megadrive emulator", + }; + const uint32_t NUM_LINES = sizeof(lines)/sizeof(*lines); + const char *thanks[] = { + "Nemesis: Documentatino and test ROMs", + "Charles MacDonald: Documentation", + "Eke-Eke: Documentation", + "Bart Trzynadlowski: Documentation", + "KanedaFR: Hosting the best Sega forum", + "Titan: Awesome demos and documentation", + "micky: Testing", + "Sasha: Testing", + "lol-frank: Testing", + "Sik: Testing", + "Tim Lawrence : Testing", + "ComradeOj: Testing", + "Vladikcomper: Testing" + }; + const uint32_t NUM_THANKS = sizeof(thanks)/sizeof(*thanks); + uint32_t width = render_width(); + uint32_t height = render_height(); + if (nk_begin(context, "About", nk_rect(0, 0, width, height), 0)) { + nk_layout_row_static(context, 30, width-40, 1); + for (uint32_t i = 0; i < NUM_LINES; i++) + { + nk_label(context, lines[i], NK_TEXT_LEFT); + } + nk_layout_row_static(context, height - 80 - 34*NUM_LINES, width-40, 1); + if (nk_group_begin(context, "Special Thanks", NK_WINDOW_TITLE)) { + nk_layout_row_static(context, 30, width - 80, 1); + for (uint32_t i = 0; i < NUM_THANKS; i++) + { + nk_label(context, thanks[i], NK_TEXT_LEFT); + } + nk_group_end(context); + } + nk_layout_row_static(context, 52, width/3, 1); + if (nk_button_label(context, "Back")) { + pop_view(); + } + nk_end(context); + } } typedef struct { |