| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #pragma once
- #include "BsScriptEnginePrerequisites.h"
- #include "BsScriptGUIElement.h"
- namespace BansheeEngine
- {
- /**
- * @brief Interop class between C++ & CLR for GUIToggle.
- */
- class BS_SCR_BE_EXPORT ScriptGUIToggle : public TScriptGUIElement<ScriptGUIToggle>
- {
- public:
- SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIToggle")
- private:
- ScriptGUIToggle(MonoObject* instance, GUIToggle* toggle);
- /**
- * @brief Triggered when the native toggle button is clicked.
- */
- static void onClick(MonoObject* instance);
- /**
- * @brief Triggered when the native toggle button is hover over.
- */
- static void onHover(MonoObject* instance);
- /**
- * @brief Triggered when the pointer leaves the native toggle button.
- */
- static void onOut(MonoObject* instance);
- /**
- * @brief Triggered when the native toggle button is toggled.
- */
- static void onToggled(MonoObject* instance, bool toggled);
- /************************************************************************/
- /* CLR HOOKS */
- /************************************************************************/
- static void internal_createInstance(MonoObject* instance, MonoObject* content,
- MonoObject* toggleGroup, MonoString* style, MonoArray* guiOptions);
- static void internal_setContent(ScriptGUIToggle* nativeInstance, MonoObject* content);
- static void internal_toggleOn(ScriptGUIToggle* nativeInstance);
- static void internal_toggleOff(ScriptGUIToggle* nativeInstance);
- static void internal_setTint(ScriptGUIToggle* nativeInstance, Color color);
- typedef void (__stdcall *OnClickThunkDef) (MonoObject*, MonoException**);
- typedef void (__stdcall *OnHoverThunkDef) (MonoObject*, MonoException**);
- typedef void (__stdcall *OnOutThunkDef) (MonoObject*, MonoException**);
- typedef void (__stdcall *OnToggledThunkDef) (MonoObject*, bool toggled, MonoException**);
- static OnClickThunkDef onClickThunk;
- static OnHoverThunkDef onHoverThunk;
- static OnOutThunkDef onOutThunk;
- static OnToggledThunkDef onToggledThunk;
- };
- }
|