예제 #1
0
    public static int TooltipSelectionGrid(Rect windowRect, Rect listRect, Rect gridRect, int nGridIndex, GUIContent[] cons, int nColumCount, GUIStyle style)
    {
        int result         = GUI.SelectionGrid(gridRect, nGridIndex, cons, nColumCount, style);
        int gridHoverIndex = FXMakerLayout.GetGridHoverIndex(windowRect, listRect, gridRect, cons.Length, nColumCount, null);

        if (0 <= gridHoverIndex)
        {
            GUI.tooltip = cons[gridHoverIndex].tooltip;
        }
        return(result);
    }
예제 #2
0
    public static int TooltipToolbar(Rect windowRect, Rect gridRect, int nGridIndex, GUIContent[] cons, GUIStyle style)
    {
        int result         = GUI.Toolbar(gridRect, nGridIndex, cons, style);
        int gridHoverIndex = FXMakerLayout.GetGridHoverIndex(windowRect, gridRect, gridRect, cons.Length, cons.Length, null);

        if (0 <= gridHoverIndex)
        {
            GUI.tooltip = cons[gridHoverIndex].tooltip;
        }
        return(result);
    }