Esempio n. 1
0
 protected virtual void Awake()
 {
     roar = DefaultRoar.Instance;
     if (customGUISkin == null)
         skin = roar.defaultGUISkin;
     else
         skin = customGUISkin;
     useGUILayout = false;
     enabled = false;
 }
Esempio n. 2
0
    private static void _CreateRoarLeaderboardsWidgetObject()
    {
        GameObject go = RoarObjectFactory.CreateGameObjectInScene("RoarLeaderboardsWidget");

        go.AddComponent <RoarLeaderboardsWidget>();

        DefaultRoar defaultRoar = GameObject.FindObjectOfType(typeof(DefaultRoar)) as DefaultRoar;

        go.transform.parent = defaultRoar.transform;

        Selection.activeGameObject = go;
    }
Esempio n. 3
0
    protected override void Awake()
    {
        base.Awake();

        roar = DefaultRoar.Instance;

        // Load a skin if specified.
        if (skin == null) skin = roar.defaultGUISkin;

        // listen for log-in event
        RoarLoginWidget.OnFullyLoggedIn -= OnRoarLogin;
        RoarLoginWidget.OnFullyLoggedIn += OnRoarLogin;
        RoarManager.loggedOutEvent -= OnRoarLogout;
        RoarManager.loggedOutEvent += OnRoarLogout;

        enabled = false;
    }
Esempio n. 4
0
    protected override void Awake()
    {
        bounds.width = bounds.width * scaleMultiplier;
        bounds.height = bounds.height * scaleMultiplier;
        apearance.headerHeight = apearance.headerHeight * scaleMultiplier;
        apearance.closeButtonSize = apearance.closeButtonSize * scaleMultiplier;
        base.Awake();

        roar = DefaultRoar.Instance;

        // Load a skin if specified.
        if (skin == null) skin = roar.defaultGUISkin;

        // listen for log-in event
        RoarLoginWidget.OnFullyLoggedIn -= OnRoarLogin;
        RoarLoginWidget.OnFullyLoggedIn += OnRoarLogin;
        RoarManager.loggedOutEvent -= OnRoarLogout;
        RoarManager.loggedOutEvent += OnRoarLogout;

        enabled = false;
    }
Esempio n. 5
0
    protected override void Awake()
    {
        bounds.width              = bounds.width * scaleMultiplier;
        bounds.height             = bounds.height * scaleMultiplier;
        apearance.headerHeight    = apearance.headerHeight * scaleMultiplier;
        apearance.closeButtonSize = apearance.closeButtonSize * scaleMultiplier;
        base.Awake();

        roar = DefaultRoar.Instance;

        // Load a skin if specified.
        if (skin == null)
        {
            skin = roar.defaultGUISkin;
        }

        // listen for log-in event
        RoarLoginWidget.OnFullyLoggedIn -= OnRoarLogin;
        RoarLoginWidget.OnFullyLoggedIn += OnRoarLogin;
        RoarManager.loggedOutEvent      -= OnRoarLogout;
        RoarManager.loggedOutEvent      += OnRoarLogout;

        enabled = false;
    }
Esempio n. 6
0
    protected virtual void Awake()
    {
        roar = DefaultRoar.Instance;
        if (customGUISkin == null)
            skin = roar.defaultGUISkin;
        else
            skin = customGUISkin;

        boundingGUIContent = new GUIContent(boundingTitle, boundingImage);
        if (draggableWindowFullScreen)
            draggableWindowBounds = new Rect(0,0,Screen.width,Screen.height);
        scrollViewRect = bounds;
        if (initialContentWidth == 0)
            initialContentWidth = bounds.width;
        if (initialContentHeight == 0)
            initialContentHeight = bounds.height;
        scrollViewRect.width = initialContentWidth;
        scrollViewRect.height = initialContentHeight;

        // listen for log-in event
        RoarLoginModule.OnFullyLoggedIn -= OnRoarLogin;
        RoarLoginModule.OnFullyLoggedIn += OnRoarLogin;
        RoarManager.loggedOutEvent -= OnRoarLogout;
        RoarManager.loggedOutEvent += OnRoarLogout;

        switch (boundType)
        {
        case BoundType.FixedWindow:
        case BoundType.DraggableWindow:
            windowIdGenerator++;
            windowId = windowIdGenerator;

            // horizontal binding
            switch (horizontalAlignment)
            {
            case AlignmentHorizontal.Right:
                bounds.x = Screen.width - bounds.width;
                break;
            case AlignmentHorizontal.Center:
                bounds.x = (Screen.width - bounds.width) / 2;
                break;
            }
            bounds.x += horizontalOffset;

            // vertical binding
            switch (verticalAlignment)
            {
            case AlignmentVertical.Bottom:
                bounds.y = Screen.height - bounds.height;
                break;
            case AlignmentVertical.Center:
                bounds.y = (Screen.height - bounds.height) / 2;
                break;
            }
            bounds.y += verticalOffset;

            break;

        default:
            useGUILayout = false;
            break;
        }

        enabled = false;
    }