mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
lua: gui library (WIP)
This commit is contained in:
parent
302b649634
commit
05589b721e
14 changed files with 262 additions and 25 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "../../engine.h"
|
||||
#include "LuaState.h"
|
||||
#include "../../util/stringutil.h"
|
||||
#include "../../util/timeutil.h"
|
||||
|
||||
using namespace scripting;
|
||||
|
||||
|
|
@ -245,6 +246,7 @@ bool scripting::on_item_break_block(Player* player, const ItemDef* item, int x,
|
|||
}
|
||||
|
||||
void scripting::on_ui_open(UiDocument* layout, Inventory* inventory) {
|
||||
timeutil::ScopeLogTimer log(555);
|
||||
std::string name = layout->getId()+".open";
|
||||
if (state->getglobal(name)) {
|
||||
state->pushinteger(inventory->getId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue