Much better narration/dialogue/action handling (and for lua too)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define __GUIMODULECOMMON_H__
|
||||
#include <iostream>
|
||||
#include <Ogre.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "Components.h"
|
||||
#include "GameData.h"
|
||||
namespace ECS
|
||||
@@ -21,6 +22,7 @@ struct GUI {
|
||||
Ogre::String mnarrationText;
|
||||
std::vector<Ogre::String> mchoices;
|
||||
int narration_answer;
|
||||
nlohmann::json props;
|
||||
|
||||
private:
|
||||
bool complete;
|
||||
@@ -91,6 +93,18 @@ struct GUI {
|
||||
event(ev);
|
||||
}
|
||||
virtual ~NarrationHandler() {}
|
||||
void setProperties(const Ogre::String &properties)
|
||||
{
|
||||
props = nlohmann::json::parse(properties);
|
||||
}
|
||||
Ogre::String getProperties() const
|
||||
{
|
||||
return props.dump();
|
||||
}
|
||||
const nlohmann::json &getPropsJSON() const
|
||||
{
|
||||
return props;
|
||||
}
|
||||
};
|
||||
|
||||
static void setWindowGrab(bool g = true)
|
||||
|
||||
Reference in New Issue
Block a user