2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-21 04:59:11 +00:00

Initial work on entity introspection

This commit is contained in:
2021-05-25 22:49:24 -04:00
parent bae1d7d59f
commit 0841bd4ab2
11 changed files with 99 additions and 25 deletions

View File

@@ -7,6 +7,18 @@
#include "Runtime/World/CEntityInfo.hpp"
#include "Runtime/World/ScriptObjectSupport.hpp"
#ifndef ENABLE_IMGUI
#define ENABLE_IMGUI 1
#endif
#if ENABLE_IMGUI
#define IMGUI_ENTITY_PROTOTYPES \
std::string_view ImGuiType() override; \
void ImGuiInspect() override;
#else
#define IMGUI_ENTITY_PROTOTYPES
#endif
namespace metaforce {
class CStateManager;
class IVisitor;
@@ -36,6 +48,10 @@ public:
virtual void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr);
virtual void SetActive(bool active) { x30_24_active = active; }
// Debugging utilities
virtual std::string_view ImGuiType();
virtual void ImGuiInspect();
bool GetActive() const { return x30_24_active; }
void ToggleActive() { x30_24_active ^= 1; }