BsScriptGUIElementStateStyle.h 1.3 KB

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