UnityEngine.GUIStyle.GetCursorStringIndex C# (CSharp) Method

GetCursorStringIndex() public method

Get the cursor position (indexing into contents.text) when the user clicked at cursorPixelPosition.

public GetCursorStringIndex ( Rect position, GUIContent content, Vector2 cursorPixelPosition ) : int
position Rect
content GUIContent
cursorPixelPosition Vector2
return int
        public int GetCursorStringIndex(Rect position, GUIContent content, Vector2 cursorPixelPosition)
        {
            return Internal_GetCursorStringIndex(this.m_Ptr, position, content, cursorPixelPosition);
        }

Usage Example

コード例 #1
0
 static int GetCursorStringIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         UnityEngine.GUIStyle   obj  = (UnityEngine.GUIStyle)ToLua.CheckObject(L, 1, typeof(UnityEngine.GUIStyle));
         UnityEngine.Rect       arg0 = (UnityEngine.Rect)ToLua.CheckObject(L, 2, typeof(UnityEngine.Rect));
         UnityEngine.GUIContent arg1 = (UnityEngine.GUIContent)ToLua.CheckObject(L, 3, typeof(UnityEngine.GUIContent));
         UnityEngine.Vector2    arg2 = ToLua.ToVector2(L, 4);
         int o = obj.GetCursorStringIndex(arg0, arg1, arg2);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
All Usage Examples Of UnityEngine.GUIStyle::GetCursorStringIndex