merge with/from trunk at r35190
[blender.git] / intern / ghost / intern / GHOST_EventButton.h
index 3016917b810c197bb7b857c2caa43d28b0f4c1a9..3294a780b49cadbcf7a46be4da6f7a8cf3d72d51 100644 (file)
@@ -59,6 +59,23 @@ public:
                m_data = &m_buttonEventData;
        }
 
+       virtual int serialize(char buf[256])
+       {
+               sprintf(buf, "button mask: %d", m_buttonEventData.button);
+               
+               return 0;
+       }
+       
+       GHOST_EventButton(GHOST_TUns64 time, GHOST_TEventType type, GHOST_IWindow* window, char buf[256])
+               : GHOST_Event(time, type, window)
+       {
+               int i;
+               sscanf(buf, "button mask: %d", &i);
+               
+               m_buttonEventData.button = (GHOST_TButtonMask)i;
+               m_data = &m_buttonEventData;
+       }
+
 protected:
        /** The button event data. */
        GHOST_TEventButtonData m_buttonEventData;