public bool HandleKeyEvent(SFKey.Code cd, SFKeyModifiers.Modifiers mod, UInt32 down, int keyboardIndex = 0) { if (MovieID == -1) { return false; } if (AcceptKeyEvents()) { return SF_HandleKeyEvent(MovieID, cd, mod, down, keyboardIndex); } return false; }
protected static extern bool SF_HandleKeyEvent(long movieID, SFKey.Code cd, SFKeyModifiers.Modifiers mod, UInt32 down, int keyboardIndex);
/// <summary> /// Passes key events to Scaleform runtime for processing. /// </summary> /// <param name="cd"> The scaleform keycode corresponding the Unity key code. See SFKey.cs for the mapping table.</param> /// <param name="mod"> Key Modifiers.</param> /// <param name="down"> indicates whether the key event is up/down.</param> /// <param name="breturnOnHandled">In general, key events are sent to all movies. Set this flag to true if you don't want other movies to handle key events.</param> /// <param name="keyboardIndex"> Indicates the keyboard index in case multiple keyboards are connected.</param> /// <returns> Indicates whether the key event was processed successfully by the runtime.</returns> public virtual bool HandleKeyEvent(SFKey.Code cd, SFKeyModifiers.Modifiers mod, UInt32 down, ref bool breturnOnHandled, int keyboardIndex = 0) { if (MovieID == 0) { return false; } if (AcceptKeyEvents()) { #if UNITY_WP8 return sf_handleKeyEvent(MovieID, cd, mod, down, keyboardIndex); #else return SF_HandleKeyEvent(MovieID, cd, mod, down, keyboardIndex); #endif } return false; }