forked from orkido/LViewLoL
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathScript.h
More file actions
45 lines (35 loc) · 1006 Bytes
/
Script.h
File metadata and controls
45 lines (35 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "PyGame.h"
#include "PyImguiInterface.h"
#include "Python.h"
#include "ConfigSet.h"
#include <chrono>
using namespace std::chrono;
/// Represents a python gameplay script
class Script {
public:
void Load(const char* file);
void ExecUpdate(const PyGame& state, const PyImguiInterface& ui);
void ExecDrawSettings(const PyGame& state, const PyImguiInterface& ui);
void ExecLoadCfg();
void ExecSaveCfg();
~Script();
private:
bool LoadFunc(PyObject** loadInto, const char* funcName);
bool LoadInfo();
public:
std::string description;
std::string author;
std::string name;
std::string targetChampion;
std::string loadError;
std::string execError;
duration<float, std::milli> updateTimeMs;
bool enabled;
private:
PyObject* moduleObj;
PyObject* updateFunc;
PyObject* drawSettingsFunc;
PyObject* loadCfgFunc;
PyObject* saveCfgFunc;
};