This commit is contained in:
nephacks
2025-06-04 03:22:50 +02:00
parent f234f23848
commit f12416cffd
14243 changed files with 6446499 additions and 26 deletions

View File

@@ -0,0 +1,57 @@
//===== Copyright <20> Valve Corporation, All rights reserved. ======//
//
// Purpose: Defines gameui scripting system.
//
//===========================================================================//
#ifndef GAMEUISCRIPT_H
#define GAMEUISCRIPT_H
#ifdef _WIN32
#pragma once
#endif
#include "gameuiscriptsystem.h"
class CGameUIScriptInterface;
class CGameUIDefinition;
class KeyValues;
class CGameUIScript
{
public:
CGameUIScript( );
~CGameUIScript( );
void Shutdown();
IScriptVM *GetVM( ) { return m_pScriptVM; }
CUtlString &GetName( ) { return m_Name; }
int GetVersion( ) { return m_Version; }
CUtlString &GetScriptFile( ) { return m_ScriptFile; }
bool IsActive( ) { return m_IsActive; }
bool SetScript( const char *pszFileName, CGameUIDefinition *pDef );
void SetActive( bool IsActive ) { m_IsActive = IsActive; }
bool Execute( KeyValues *pData, KeyValues **ppResult );
CGameUIScriptInterface * GetScriptInterface() const { return m_pGameUIScriptInterface; }
private:
bool GetScriptName( );
bool GetScriptType( );
bool GetScriptVersion( );
CGameUIScriptInterface *m_pGameUIScriptInterface;
CUtlString m_Name;
int m_Version;
bool m_IsActive;
CUtlString m_ScriptFile;
IScriptVM *m_pScriptVM;
HSCRIPT m_Scope;
};
#endif // GAMEUISCRIPT_H