fixed lua crash on wrong command

This commit is contained in:
Lendemor 2017-01-22 01:14:36 +01:00
parent 64247c75e0
commit dbbe726859
2 changed files with 2 additions and 2 deletions

View File

@ -24,6 +24,6 @@ void ScriptNode::execute(std::string to_execute){
try{
s.script(to_execute);
}catch(sol::error error_lua){
std::cerr << error_lua.what() << std::endl;
this->getEngine().getShell()->out(error_lua.what(),glm::vec3(1,0,0));
}
}

View File

@ -40,7 +40,7 @@ SparrowShell::SparrowShell(sf::Window* window):
RESOURCE_ADD(fonte_des_neiges,Font,"shellfont");
//Create mesh for background
m_background = new BackGroundNode(glm::vec2(0),m_dimension,glm::vec3(0.1,0.1,0.1),0.5,SHELL_DEPTH,false);
m_background = new BackGroundNode(glm::vec2(0),m_dimension,glm::vec3(0.1,0.1,0.1),0.75,SHELL_DEPTH,false);
//Create mesh for scrollbar
m_scrollbar = new ShellScrollBar(this);