diff --git a/Makefile.common b/Makefile.common
index ed1624a8e5..de5f35bf16 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -423,6 +423,7 @@ endif
ifeq ($(HAVE_NUKLEAR), 1)
OBJ += menu/drivers/nuklear/nk_common.o
OBJ += menu/drivers/nuklear/nk_menu.o
+ OBJ += menu/drivers/nuklear/nk_wnd_main.o
OBJ += menu/drivers/nuklear/nk_wnd_shader_parameters.o
OBJ += menu/drivers/nuklear.o
DEFINES += -DHAVE_NUKLEAR
diff --git a/griffin/griffin.c b/griffin/griffin.c
index 9f4e290b21..8cafb8184c 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -918,6 +918,7 @@ MENU
#include "../menu/drivers/nuklear/nk_common.c"
#include "../menu/drivers/nuklear/nk_menu.c"
#include "../menu/drivers/nuklear/nk_wnd_shader_parameters.c"
+#include "../menu/drivers/nuklear/nk_wnd_main.c"
#include "../menu/drivers/nuklear.c"
#endif
diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c
index 4cda83a459..765483d8ff 100644
--- a/menu/drivers/nuklear.c
+++ b/menu/drivers/nuklear.c
@@ -53,9 +53,12 @@ static void nk_menu_main(nk_menu_handle_t *nk)
struct nk_context *ctx = &nk->ctx;
if (nk->window[ZRMENU_WND_SHADER_PARAMETERS].open)
- nk_menu_wnd_shader_parameters(nk);
+ nk_wnd_shader_parameters(nk);
+ if (nk->window[ZRMENU_WND_MAIN].open)
+ nk_wnd_main(nk);
nk->window[ZRMENU_WND_SHADER_PARAMETERS].open = !nk_window_is_closed(ctx, "Shader Parameters");
+ nk->window[ZRMENU_WND_MAIN].open = !nk_window_is_closed(ctx, "Main");
nk_buffer_info(&nk->status, &nk->ctx.memory);
}
@@ -285,6 +288,7 @@ static void *nk_menu_init(void **userdata)
nk_menu_init_device(nk);
nk->window[ZRMENU_WND_SHADER_PARAMETERS].open = true;
+ nk->window[ZRMENU_WND_MAIN].open = true;
return menu;
error:
diff --git a/menu/drivers/nuklear/nk_menu.c b/menu/drivers/nuklear/nk_menu.c
index 3b501086d4..5e74be2ddf 100644
--- a/menu/drivers/nuklear/nk_menu.c
+++ b/menu/drivers/nuklear/nk_menu.c
@@ -21,7 +21,7 @@
#include "nk_menu.h"
/* sets window position and size */
-void nk_menu_wnd_set_state(nk_menu_handle_t *zr, const int id,
+void nk_wnd_set_state(nk_menu_handle_t *zr, const int id,
struct nk_vec2 pos, struct nk_vec2 size)
{
zr->window[id].position = pos;
@@ -29,7 +29,7 @@ void nk_menu_wnd_set_state(nk_menu_handle_t *zr, const int id,
}
/* gets window position and size */
-void nk_menu_wnd_get_state(nk_menu_handle_t *zr, const int id,
+void nk_wnd_get_state(nk_menu_handle_t *zr, const int id,
struct nk_vec2 *pos, struct nk_vec2 *size)
{
*pos = zr->window[id].position;
diff --git a/menu/drivers/nuklear/nk_menu.h b/menu/drivers/nuklear/nk_menu.h
index 9d1c7305ae..8ea2babaea 100644
--- a/menu/drivers/nuklear/nk_menu.h
+++ b/menu/drivers/nuklear/nk_menu.h
@@ -88,6 +88,6 @@ typedef struct nk_menu_handle
video_font_raster_block_t list_block;
} nk_menu_handle_t;
-void nk_menu_wnd_shader_parameters(nk_menu_handle_t *zr);
-void nk_menu_wnd_main(nk_menu_handle_t *zr);
+void nk_wnd_shader_parameters(nk_menu_handle_t *zr);
+void nk_wnd_main(nk_menu_handle_t *zr);
diff --git a/menu/drivers/nuklear/nk_wnd_main.c b/menu/drivers/nuklear/nk_wnd_main.c
new file mode 100644
index 0000000000..be5e971edf
--- /dev/null
+++ b/menu/drivers/nuklear/nk_wnd_main.c
@@ -0,0 +1,55 @@
+/* RetroArch - A frontend for libretro.
+ * Copyright (C) 2011-2016 - Daniel De Matteis
+ * Copyright (C) 2014-2015 - Jean-André Santoni
+ * Copyright (C) 2016 - Andrés Suárez
+ *
+ * RetroArch is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Found-
+ * ation, either version 3 of the License, or (at your option) any later version.
+ *
+ * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with RetroArch.
+ * If not, see .
+ */
+
+#include "nk_menu.h"
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include "../../menu_driver.h"
+#include "../../menu_hash.h"
+
+
+
+
+void nk_wnd_main(nk_menu_handle_t *zr)
+{
+ unsigned i;
+ video_shader_ctx_t shader_info;
+ struct nk_panel layout;
+ struct nk_context *ctx = &zr->ctx;
+ const int id = ZRMENU_WND_MAIN;
+ settings_t *settings = config_get_ptr();
+
+ if (nk_begin(ctx, &layout, "Main", nk_rect(240, 10, 300, 400),
+ NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_MOVABLE|
+ NK_WINDOW_SCALABLE|NK_WINDOW_BORDER))
+ {
+ nk_layout_row_dynamic(ctx, 30, 1);
+
+
+ }
+ /* save position and size to restore after context reset */
+ nk_wnd_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx));
+ nk_end(ctx);
+}
\ No newline at end of file
diff --git a/menu/drivers/nuklear/nk_wnd_shader_parameters.c b/menu/drivers/nuklear/nk_wnd_shader_parameters.c
index 04b9429509..8ebc5103a5 100644
--- a/menu/drivers/nuklear/nk_wnd_shader_parameters.c
+++ b/menu/drivers/nuklear/nk_wnd_shader_parameters.c
@@ -35,7 +35,7 @@
#include "../../../retroarch.h"
-void nk_menu_wnd_shader_parameters(nk_menu_handle_t *zr)
+void nk_wnd_shader_parameters(nk_menu_handle_t *zr)
{
unsigned i;
video_shader_ctx_t shader_info;
@@ -74,6 +74,6 @@ void nk_menu_wnd_shader_parameters(nk_menu_handle_t *zr)
}
}
/* save position and size to restore after context reset */
- nk_menu_wnd_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx));
+ nk_wnd_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx));
nk_end(ctx);
}
\ No newline at end of file