MCPcopy Create free account
hub / github.com/defold/defold / LuaSourceFromStr

Function LuaSourceFromStr

engine/gui/src/test/test_gui.cpp:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91static const float TEXT_MAX_DESCENT = 0.25f;
92
93static dmLuaDDF::LuaSource* LuaSourceFromStr(const char *str, int length = -1)
94{
95 static dmLuaDDF::LuaSource src;
96 memset(&src, 0x00, sizeof(dmLuaDDF::LuaSource));
97 src.m_Script.m_Data = (uint8_t*) str;
98 src.m_Script.m_Count = (length != -1) ? length : strlen(str);
99 src.m_Filename = "dummy";
100 return &src;
101}
102
103void OnWindowResizeCallback(const dmGui::HScene scene, uint32_t width, uint32_t height)
104{

Callers 2

SetScriptFunction · 0.70
TEST_FFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected