BVB Source Codes

CRYENGINE Show ScriptBind_ActionMapManager.cpp Source code

Return Download CRYENGINE: download ScriptBind_ActionMapManager.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4.    -------------------------------------------------------------------------
  5.    $Id$
  6.    $DateTime$
  7.  
  8.    -------------------------------------------------------------------------
  9.    History:
  10.    - 8:11:2004   16:49 : Created by M谩rcio Martins
  11.  
  12. *************************************************************************/
  13. #include "StdAfx.h"
  14. #include "ScriptBind_ActionMapManager.h"
  15. #include "ActionMapManager.h"
  16.  
  17. //------------------------------------------------------------------------
  18. CScriptBind_ActionMapManager::CScriptBind_ActionMapManager(ISystem* pSystem, CActionMapManager* pActionMapManager)
  19.         : m_pSystem(pSystem),
  20.         m_pManager(pActionMapManager)
  21. {
  22.         Init(gEnv->pScriptSystem, m_pSystem);
  23.         SetGlobalName("ActionMapManager");
  24.  
  25.         RegisterGlobals();
  26.         RegisterMethods();
  27. }
  28.  
  29. //------------------------------------------------------------------------
  30. CScriptBind_ActionMapManager::~CScriptBind_ActionMapManager()
  31. {
  32. }
  33.  
  34. //------------------------------------------------------------------------
  35. void CScriptBind_ActionMapManager::RegisterGlobals()
  36. {
  37. }
  38.  
  39. //------------------------------------------------------------------------
  40. void CScriptBind_ActionMapManager::RegisterMethods()
  41. {
  42. #undef SCRIPT_REG_CLASSNAME
  43. #define SCRIPT_REG_CLASSNAME &CScriptBind_ActionMapManager::
  44.  
  45.         SCRIPT_REG_TEMPLFUNC(EnableActionFilter, "name, enable");
  46.         SCRIPT_REG_TEMPLFUNC(EnableActionMap, "name, enable");
  47.         SCRIPT_REG_TEMPLFUNC(EnableActionMapManager, "enable, resetStateOnDisable");
  48.         SCRIPT_REG_TEMPLFUNC(LoadFromXML, "name");
  49.         SCRIPT_REG_TEMPLFUNC(InitActionMaps, "path");
  50.         SCRIPT_REG_TEMPLFUNC(SetDefaultActionEntity, "id, updateAll");
  51.         SCRIPT_REG_TEMPLFUNC(GetDefaultActionEntity, "");
  52.         SCRIPT_REG_TEMPLFUNC(LoadControllerLayoutFile, "layoutName");
  53.         SCRIPT_REG_TEMPLFUNC(IsFilterEnabled, "filterName");
  54. }
  55.  
  56. //------------------------------------------------------------------------
  57. int CScriptBind_ActionMapManager::EnableActionFilter(IFunctionHandler* pH, const char* name, bool enable)
  58. {
  59.         m_pManager->EnableFilter(name, enable);
  60.  
  61.         return pH->EndFunction();
  62. }
  63.  
  64. //------------------------------------------------------------------------
  65. int CScriptBind_ActionMapManager::EnableActionMap(IFunctionHandler* pH, const char* name, bool enable)
  66. {
  67.         m_pManager->EnableActionMap(name, enable);
  68.  
  69.         return pH->EndFunction();
  70. }
  71.  
  72. //------------------------------------------------------------------------
  73. int CScriptBind_ActionMapManager::EnableActionMapManager(IFunctionHandler* pH, bool enable, bool resetStateOnDisable)
  74. {
  75.         m_pManager->Enable(enable, resetStateOnDisable);
  76.         return pH->EndFunction();
  77. }
  78.  
  79. //------------------------------------------------------------------------
  80. int CScriptBind_ActionMapManager::LoadFromXML(IFunctionHandler* pH, const char* name)
  81. {
  82.         XmlNodeRef rootNode = m_pSystem->LoadXmlFromFile(name);
  83.         m_pManager->LoadFromXML(rootNode);
  84.  
  85.         return pH->EndFunction();
  86. }
  87.  
  88. //------------------------------------------------------------------------
  89. int CScriptBind_ActionMapManager::InitActionMaps(IFunctionHandler* pH, const char* path)
  90. {
  91.         m_pManager->InitActionMaps(path);
  92.         return pH->EndFunction();
  93. }
  94.  
  95. //------------------------------------------------------------------------
  96. int CScriptBind_ActionMapManager::SetDefaultActionEntity(IFunctionHandler* pH, EntityId id, bool updateAll)
  97. {
  98.         m_pManager->SetDefaultActionEntity(id, updateAll);
  99.         return pH->EndFunction();
  100. }
  101.  
  102. //------------------------------------------------------------------------
  103. int CScriptBind_ActionMapManager::GetDefaultActionEntity(IFunctionHandler* pH)
  104. {
  105.         return pH->EndFunction(m_pManager->GetDefaultActionEntity());
  106. }
  107.  
  108. //------------------------------------------------------------------------
  109. int CScriptBind_ActionMapManager::LoadControllerLayoutFile(IFunctionHandler* pH, const char* layoutName)
  110. {
  111.         return pH->EndFunction(m_pManager->LoadControllerLayoutFile(layoutName));
  112. }
  113.  
  114. //------------------------------------------------------------------------
  115. int CScriptBind_ActionMapManager::IsFilterEnabled(IFunctionHandler* pH, const char* filterName)
  116. {
  117.         return pH->EndFunction(m_pManager->IsFilterEnabled(filterName));
  118. }
  119.  
downloadScriptBind_ActionMapManager.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top