# HG changeset patch # User Michael Pavone # Date 1511974427 28800 # Node ID 919c0c33885e02c74134b858328c98ae93b47585 # Parent 637fbc3b50632acf9031a8df6d91c745c9cb87bc Initial work on settings menu diff -r 637fbc3b5063 -r 919c0c33885e nuklear_ui/blastem_nuklear.c --- a/nuklear_ui/blastem_nuklear.c Wed Nov 29 08:41:37 2017 -0800 +++ b/nuklear_ui/blastem_nuklear.c Wed Nov 29 08:53:47 2017 -0800 @@ -201,6 +201,46 @@ nk_layout_space_end(context); } +void view_key_bindings(struct nk_context *context) +{ + +} +void view_controllers(struct nk_context *context) +{ + +} +void view_video_settings(struct nk_context *context) +{ + +} +void view_audio_settings(struct nk_context *context) +{ + +} +void view_system_settings(struct nk_context *context) +{ + +} + +void view_settings(struct nk_context *context) +{ + static menu_item items[] = { + {"Key Bindings", view_key_bindings}, + {"Controllers", view_controllers}, + {"Video", view_video_settings}, + {"Audio", view_audio_settings}, + {"System", view_system_settings}, + {"Back", NULL} + }; + + const uint32_t num_buttons = 6; + items[num_buttons-1].next_view = previous_view; + if (nk_begin(context, "Settings Menu", nk_rect(0, 0, render_width(), render_height()), 0)) { + menu(context, sizeof(items)/sizeof(*items), items); + nk_end(context); + } +} + void view_pause(struct nk_context *context) { static menu_item items[] = { @@ -209,6 +249,7 @@ {"Lock On", view_lock_on}, {"Save State", view_save_state}, {"Load State", view_load_state}, + {"Settings", view_settings}, {"Exit", NULL} }; @@ -223,6 +264,7 @@ { static menu_item items[] = { {"Load ROM", view_load}, + {"Settings", view_settings}, {"About", view_about}, {"Exit", NULL} };