patterns: Added std::env and ability to pass parameters to patterns from the UI

This commit is contained in:
WerWolv
2021-12-10 11:55:27 +01:00
parent 6a0ad22774
commit 8f2e382c8a
8 changed files with 133 additions and 8 deletions

View File

@@ -37,6 +37,21 @@ namespace hex::plugin::builtin {
TextEditor m_textEditor;
std::vector<std::pair<pl::LogConsole::Level, std::string>> m_console;
enum class EnvVarType {
Integer,
Float,
String,
Bool
};
struct EnvVar {
std::string name;
pl::Token::Literal value;
EnvVarType type;
};
std::vector<EnvVar> m_envVarEntries;
void loadPatternFile(const std::string &path);
void clearPatternData();
void parsePattern(char *buffer);