BsScriptGUIElementStateStyle.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "GUI/BsGUIElementStyle.h"
  7. namespace bs
  8. {
  9. /** @addtogroup ScriptInteropEngine
  10. * @{
  11. */
  12. /** Contains native representation of the GUIElementStateStyle structure. */
  13. struct ScriptGUIElementStateStyleStruct // Note: Must match C# struct GUIElementStateStyle.
  14. {
  15. MonoObject* texture;
  16. Color textColor;
  17. };
  18. /** Performs conversion between managed GUIElementStateStyle and native GUIElementStyle::GUIElementStateStyle. */
  19. class BS_SCR_BE_EXPORT ScriptGUIElementStateStyle : public ScriptObject<ScriptGUIElementStateStyle>
  20. {
  21. public:
  22. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIElementStateStyle")
  23. /**
  24. * Creates a new managed instance of GUIElementStateStyle.
  25. *
  26. * @param[in] state Native GUI element style state to copy to the managed instance.
  27. */
  28. static ScriptGUIElementStateStyleStruct toManaged(const GUIElementStyle::GUIElementStateStyle& state);
  29. /** Converts a managed instance of GUIElementStateStyle to a native GUI element style state. */
  30. static GUIElementStyle::GUIElementStateStyle toNative(const ScriptGUIElementStateStyleStruct& instance);
  31. private:
  32. ScriptGUIElementStateStyle(MonoObject* instance);
  33. };
  34. /** @} */
  35. }