diff options
Diffstat (limited to 'Runtime/IMGUI/GUIContent.h')
-rw-r--r-- | Runtime/IMGUI/GUIContent.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Runtime/IMGUI/GUIContent.h b/Runtime/IMGUI/GUIContent.h new file mode 100644 index 0000000..5570bf8 --- /dev/null +++ b/Runtime/IMGUI/GUIContent.h @@ -0,0 +1,36 @@ +#ifndef GUIContent_H +#define GUIContent_H + +#include "Runtime/IMGUI/TextUtil.h" +#include "Runtime/Graphics/Texture.h" +#include "Runtime/Utilities/dynamic_array.h" +#include "Runtime/Misc/UTF8.h" + +struct GUIContent +{ + UTF16String m_Text; + UTF16String m_Tooltip; + PPtr<Texture> m_Image; + + void operator = (const GUIContent& other) + { + m_Text.CopyString(other.m_Text); + m_Tooltip.CopyString(other.m_Tooltip); + m_Image = other.m_Image; + } +}; + +#if ENABLE_SCRIPTING + +struct MonoGUIContent +{ + ScriptingStringPtr m_Text; + ScriptingObjectPtr m_Image; + ScriptingStringPtr m_Tooltip; +}; + +GUIContent &MonoGUIContentToTempNative (ScriptingObjectPtr monoContent); +void MonoGUIContentToNative (ScriptingObjectPtr monoContent, GUIContent& cppContent); +#endif + +#endif |