BsScriptGUIElementStateStyle.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptObject.h"
  6. #include "BsGUIElementStyle.h"
  7. namespace BansheeEngine
  8. {
  9. /**
  10. * @brief Contains native representation of the GUIElementStateStyle structure.
  11. *
  12. */
  13. struct ScriptGUIElementStateStyleStruct // Note: Must match C# struct GUIElementStateStyle.
  14. {
  15. MonoObject* texture;
  16. Color textColor;
  17. };
  18. /**
  19. * @brief Performs conversion between managed GUIElementStateStyle and native GUIElementStyle::GUIElementStateStyle.
  20. */
  21. class BS_SCR_BE_EXPORT ScriptGUIElementStateStyle : public ScriptObject<ScriptGUIElementStateStyle>
  22. {
  23. public:
  24. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIElementStateStyle")
  25. /**
  26. * @brief Creates a new managed instance of GUIElementStateStyle.
  27. *
  28. * @param state Native GUI element style state to copy to the managed instance.
  29. */
  30. static ScriptGUIElementStateStyleStruct toManaged(const GUIElementStyle::GUIElementStateStyle& state);
  31. /**
  32. * @brief Converts a managed instance of GUIElementStateStyle to a native GUI element style state.
  33. */
  34. static GUIElementStyle::GUIElementStateStyle toNative(const ScriptGUIElementStateStyleStruct& instance);
  35. private:
  36. ScriptGUIElementStateStyle(MonoObject* instance);
  37. };
  38. }