mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
TextBox new properties
This commit is contained in:
parent
cae0ceb8a3
commit
c68e89038f
5 changed files with 55 additions and 0 deletions
|
|
@ -66,6 +66,21 @@ wstringsupplier scripting::create_wstring_supplier(
|
|||
};
|
||||
}
|
||||
|
||||
wstringchecker scripting::create_wstring_validator(
|
||||
int env,
|
||||
const std::string& src,
|
||||
const std::string& file
|
||||
) {
|
||||
return [=](const std::wstring& x){
|
||||
if (processCallback(env, src, file)) {
|
||||
state->pushstring(util::wstr2str_utf8(x));
|
||||
if (state->callNoThrow(1))
|
||||
return state->toboolean(-1);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
boolconsumer scripting::create_bool_consumer(
|
||||
int env,
|
||||
const std::string& src,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue