changeset 1526:9bea1a199f15 nuklear_ui

Filled in About view
author Michael Pavone <pavone@retrodev.com>
date Wed, 07 Feb 2018 19:21:44 -0800
parents 3629366616da
children 4f6e8acd7b6a
files nuklear_ui/blastem_nuklear.c
diffstat 1 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/nuklear_ui/blastem_nuklear.c	Wed Feb 07 09:32:20 2018 -0800
+++ b/nuklear_ui/blastem_nuklear.c	Wed Feb 07 19:21:44 2018 -0800
@@ -136,6 +136,53 @@
 
 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 {