add app.set_title
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "graphics/ui/gui_util.hpp"
|
||||
#include "graphics/ui/GUI.hpp"
|
||||
#include "graphics/ui/elements/Menu.hpp"
|
||||
#include "window/Window.hpp"
|
||||
|
||||
using namespace scripting;
|
||||
|
||||
@@ -298,6 +299,12 @@ static int l_capture_output(lua::State* L) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_set_title(lua::State* L) {
|
||||
auto title = lua::require_string(L, 1);
|
||||
engine->getWindow().setTitle(title);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const luaL_Reg corelib[] = {
|
||||
{"blank", lua::wrap<l_blank>},
|
||||
{"get_version", lua::wrap<l_get_version>},
|
||||
@@ -319,5 +326,6 @@ const luaL_Reg corelib[] = {
|
||||
{"open_url", lua::wrap<l_open_url>},
|
||||
{"quit", lua::wrap<l_quit>},
|
||||
{"capture_output", lua::wrap<l_capture_output>},
|
||||
{"set_title", lua::wrap<l_set_title>},
|
||||
{nullptr, nullptr}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user