BVB Source Codes

CRYENGINE Show FlashUIActionNodes.h Source code

Return Download CRYENGINE: download FlashUIActionNodes.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. // -------------------------------------------------------------------------
  4. //  File name:   FlashUIActionNodes.h
  5. //  Version:     v1.00
  6. //  Created:     10/9/2010 by Paul Reindell.
  7. //  Description:
  8. // -------------------------------------------------------------------------
  9. //  History:
  10. //
  11. ////////////////////////////////////////////////////////////////////////////
  12. #ifndef __FlashUIActionNodes_H__
  13. #define __FlashUIActionNodes_H__
  14.  
  15. #include <CrySystem/Scaleform/IFlashUI.h>
  16. #include "FlashUIBaseNode.h"
  17.  
  18. //--------------------------------------------------------------------------------------------
  19. class CFlashUIActionBaseNode : public CFlowBaseNode<eNCT_Instanced>, public IUIActionListener
  20. {
  21. public:
  22.         CFlashUIActionBaseNode(const char* name);
  23.         virtual ~CFlashUIActionBaseNode();
  24.  
  25.         virtual void         GetConfiguration(SFlowNodeConfig& config) = 0;
  26.         virtual void         ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo) = 0;
  27.         virtual void         GetMemoryUsage(ICrySizer* s) const { s->Add(*this); }
  28.         virtual IFlowNodePtr Clone(SActivationInfo* pActInfo) = 0;
  29.  
  30.         virtual void         OnStart(IUIAction* pAction, const SUIArguments& args) {};
  31.         virtual void         OnEnd(IUIAction* pAction, const SUIArguments& args)   {};
  32.  
  33. protected:
  34.         void UpdateAction(const char* sName, bool bStrict);
  35.         void UpdateAction(IFlowGraph* pGraph);
  36.  
  37. protected:
  38.         IUIAction* m_pAction;
  39. };
  40.  
  41. //--------------------------------------------------------------------------------------------
  42. class CFlashUIStartActionNode : public CFlashUIActionBaseNode
  43. {
  44. public:
  45.         CFlashUIStartActionNode(SActivationInfo* pActInfo) : CFlashUIActionBaseNode("CFlashUIStartActionNode") {};
  46.         ~CFlashUIStartActionNode();
  47.  
  48.         virtual void         GetConfiguration(SFlowNodeConfig& config);
  49.         virtual void         ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo);
  50.         virtual IFlowNodePtr Clone(SActivationInfo* pActInfo) { return new CFlashUIStartActionNode(pActInfo); }
  51.  
  52.         virtual void         OnStart(IUIAction* pAction, const SUIArguments& args);
  53.  
  54. private:
  55.         void FlushNextAction(SActivationInfo* pActInfo);
  56.  
  57. private:
  58.         enum InputPorts
  59.         {
  60.                 eI_UseAsState = 0,
  61.         };
  62.  
  63.         enum OutputPorts
  64.         {
  65.                 eO_OnActionStart = 0,
  66.                 eO_Args,
  67.         };
  68.  
  69.         typedef CUIStack<std::pair<IUIAction*, SUIArguments>> TActionStack;
  70.         TActionStack m_stack;
  71. };
  72.  
  73. //--------------------------------------------------------------------------------------------
  74. class CFlashUIEndActionNode : public CFlashUIActionBaseNode
  75. {
  76. public:
  77.         CFlashUIEndActionNode(SActivationInfo* pActInfo) : CFlashUIActionBaseNode("CFlashUIEndActionNode") {}
  78.  
  79.         virtual void         GetConfiguration(SFlowNodeConfig& config);
  80.         virtual void         ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo);
  81.         virtual void         GetMemoryUsage(ICrySizer* s) const { s->Add(*this); }
  82.         virtual IFlowNodePtr Clone(SActivationInfo* pActInfo)   { return new CFlashUIEndActionNode(pActInfo); }
  83.  
  84. private:
  85.         enum InputPorts
  86.         {
  87.                 eI_OnActionEnd = 0,
  88.                 eI_UseAsState,
  89.                 eI_Args,
  90.         };
  91. };
  92.  
  93. //--------------------------------------------------------------------------------------------
  94. class CFlashUIActionNode : public CFlashUIActionBaseNode
  95. {
  96. public:
  97.         CFlashUIActionNode(SActivationInfo* pActInfo)
  98.                 : CFlashUIActionBaseNode("CFlashUIActionNode")
  99.                 , m_bWasStarted(false)
  100.         {};
  101.         ~CFlashUIActionNode();
  102.  
  103.         virtual void         GetConfiguration(SFlowNodeConfig& config);
  104.         virtual void         ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo);
  105.         virtual void         GetMemoryUsage(ICrySizer* s) const { s->Add(*this); }
  106.         virtual IFlowNodePtr Clone(SActivationInfo* pActInfo)   { return new CFlashUIActionNode(pActInfo); }
  107.  
  108.         virtual void         OnStart(IUIAction* pAction, const SUIArguments& args);
  109.         virtual void         OnEnd(IUIAction* pAction, const SUIArguments& args);
  110.  
  111. private:
  112.         void FlushNextAction(SActivationInfo* pActInfo);
  113.  
  114. private:
  115.         enum EInputs
  116.         {
  117.                 eI_UIAction = 0,
  118.                 eI_Strict,
  119.                 eI_StartAction,
  120.                 eI_Args,
  121.         };
  122.  
  123.         enum EOutputs
  124.         {
  125.                 eO_UIOnStart = 0,
  126.                 eO_UIOnEnd,
  127.                 eO_UIOnStartAll,
  128.                 eO_UIOnEndAll,
  129.                 eO_Args,
  130.         };
  131.  
  132.         bool m_bWasStarted;
  133.  
  134.         typedef CUIStack<std::pair<IUIAction*, SUIArguments>> TActionStack;
  135.         TActionStack m_startStack;
  136.         TActionStack m_endStack;
  137.         TActionStack m_selfEndStack;
  138. };
  139.  
  140. #endif
  141.  
downloadFlashUIActionNodes.h 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