Various improvements:

Framebuffer resize queued to next frame to fix flickering
Wren VM init moved to on play event
Added new Wren modules
Added missing components to the editor
Changed how the wren scripts gets initialized
This commit is contained in:
Antoine Pilote
2021-06-12 13:01:07 -04:00
parent 855bb1edd6
commit cdfee1981c
25 changed files with 451 additions and 108 deletions

View File

@@ -1,5 +1,5 @@
#include "InterfaceParser.h"
#include "Styling/Stylesheet.h"
Ref<Canvas> InterfaceParser::Root = CreateRef<Canvas>();
void InterfaceParser::Iterate(const pugi::xml_node& xml_node, Ref<Node> node, int depth)
@@ -271,6 +271,11 @@ Ref<Canvas> InterfaceParser::CreateCanvas(const pugi::xml_node& xml_node)
std::string module = s[1];
node->Script = ScriptingEngine::RegisterScript(path, module);
}
if (name == "stylesheet")
{
std::string path = a.value();
node->StyleSheet = UI::StyleSheet::New(path);
}
}
return node;