UnityEngine.GUIStyle.Internal_GetCursorFlashOffset C# (CSharp) Method

Internal_GetCursorFlashOffset() private method

private Internal_GetCursorFlashOffset ( ) : float
return float
        private static extern float Internal_GetCursorFlashOffset();
        private static void Internal_DrawCursor(IntPtr target, Rect position, GUIContent content, int pos, Color cursorColor)

Usage Example

コード例 #1
0
ファイル: GUIStyle.cs プロジェクト: zuohu/UnityDecompiled
 internal void DrawWithTextSelection(Rect position, GUIContent content, int controlID, int firstSelectedCharacter, int lastSelectedCharacter, bool drawSelectionAsComposition)
 {
     if (Event.current.type != EventType.Repaint)
     {
         Debug.LogError("Style.Draw may not be called if it is not a repaint event");
     }
     else
     {
         Event current          = Event.current;
         Color cursorColor      = new Color(0f, 0f, 0f, 0f);
         float cursorFlashSpeed = GUI.skin.settings.cursorFlashSpeed;
         float num = (Time.realtimeSinceStartup - GUIStyle.Internal_GetCursorFlashOffset()) % cursorFlashSpeed / cursorFlashSpeed;
         if (cursorFlashSpeed == 0f || num < 0.5f)
         {
             cursorColor = GUI.skin.settings.cursorColor;
         }
         Internal_DrawWithTextSelectionArguments internal_DrawWithTextSelectionArguments = default(Internal_DrawWithTextSelectionArguments);
         internal_DrawWithTextSelectionArguments.target                     = this.m_Ptr;
         internal_DrawWithTextSelectionArguments.position                   = position;
         internal_DrawWithTextSelectionArguments.firstPos                   = firstSelectedCharacter;
         internal_DrawWithTextSelectionArguments.lastPos                    = lastSelectedCharacter;
         internal_DrawWithTextSelectionArguments.cursorColor                = cursorColor;
         internal_DrawWithTextSelectionArguments.selectionColor             = GUI.skin.settings.selectionColor;
         internal_DrawWithTextSelectionArguments.isHover                    = ((!position.Contains(current.mousePosition)) ? 0 : 1);
         internal_DrawWithTextSelectionArguments.isActive                   = ((controlID != GUIUtility.hotControl) ? 0 : 1);
         internal_DrawWithTextSelectionArguments.on                         = 0;
         internal_DrawWithTextSelectionArguments.hasKeyboardFocus           = ((controlID != GUIUtility.keyboardControl || !GUIStyle.showKeyboardFocus) ? 0 : 1);
         internal_DrawWithTextSelectionArguments.drawSelectionAsComposition = ((!drawSelectionAsComposition) ? 0 : 1);
         GUIStyle.Internal_DrawWithTextSelection(content, ref internal_DrawWithTextSelectionArguments);
     }
 }
All Usage Examples Of UnityEngine.GUIStyle::Internal_GetCursorFlashOffset