From 936a2df6760cb84e1bdf1bfca22b24cf9e1ecce2 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 27 Nov 2016 13:40:58 +0100 Subject: [PATCH] SDK/Lua: Bind WindowStyle --- SDK/src/NDK/Lua/LuaBinding_Utility.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SDK/src/NDK/Lua/LuaBinding_Utility.cpp b/SDK/src/NDK/Lua/LuaBinding_Utility.cpp index c39a4eaac..173d6c3c5 100644 --- a/SDK/src/NDK/Lua/LuaBinding_Utility.cpp +++ b/SDK/src/NDK/Lua/LuaBinding_Utility.cpp @@ -344,6 +344,8 @@ namespace Ndk keyboard.PushGlobalTable(instance); { + static_assert(Nz::Keyboard::Count == 121, "Nz::Keyboard::Key has been updated but change was not reflected to Lua binding"); + instance.PushField("Undefined", Nz::Keyboard::Undefined); // A-Z @@ -426,5 +428,19 @@ namespace Ndk instance.PushField("ScrollLock", Nz::Keyboard::ScrollLock); } instance.Pop(); + + static_assert(Nz::WindowStyle_Max + 1 == 6, "Nz::WindowStyle has been updated but change was not reflected to Lua binding"); + instance.PushTable(0, Nz::WindowStyle_Max + 1); + { + instance.PushField("None", Nz::WindowStyle_None); + instance.PushField("Fullscreen", Nz::WindowStyle_Fullscreen); + instance.PushField("Closable", Nz::WindowStyle_Closable); + instance.PushField("Resizable", Nz::WindowStyle_Resizable); + instance.PushField("Titlebar", Nz::WindowStyle_Titlebar); + instance.PushField("Threaded", Nz::WindowStyle_Threaded); + } + instance.SetGlobal("WindowStyle"); + + } }