Added Wren scripting with module system 📚
Added Input pressed, released system Added interface button support with wren onclick callback
This commit is contained in:
24
Nuake/src/Scripting/WrenScript.h
Normal file
24
Nuake/src/Scripting/WrenScript.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "ScriptingEngine.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class WrenHandle;
|
||||
class WrenScript
|
||||
{
|
||||
public:
|
||||
std::map <std::string, WrenHandle*> methods;
|
||||
WrenHandle* m_Instance;
|
||||
WrenHandle* m_OnInitHandle;
|
||||
WrenHandle* m_OnUpdateHandle;
|
||||
WrenHandle* m_OnExitHandle;
|
||||
|
||||
WrenScript(const std::string& path, const std::string& mod);
|
||||
|
||||
void CallInit();
|
||||
void CallUpdate(float timestep);
|
||||
void CallExit();
|
||||
|
||||
void RegisterMethod(const std::string& signature);
|
||||
void CallMethod(const std::string& signature);
|
||||
};
|
||||
Reference in New Issue
Block a user