mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add app.set_title
This commit is contained in:
parent
d5469acb55
commit
7d367a9793
5 changed files with 19 additions and 4 deletions
|
|
@ -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}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue