コード例 #1
0
 public override void renderMe(bool isScrolling)
 {
     GUIUtilities.Text(new Rect(
                           10 * GUIUtilities.SizeFactor,
                           30 * GUIUtilities.SizeFactor,
                           Screen.width,
                           GUIUtilities.getSize(bigHeadlineStyle, new GUIContent(headLine)).y)
                       , this.headLine, bigHeadlineStyle);
 }
コード例 #2
0
    public override void renderMe(bool isScrolling)
    {
        if (GUI.Button(new Rect(40 * GUIUtilities.SizeFactor, 0, Screen.width - 80 * GUIUtilities.SizeFactor, 200 * GUIUtilities.SizeFactor), "", buttonStyle) && !isScrolling)
        {
            mainMenu.goToTutorial(tutorial);
        }

        GUI.Label(new Rect(
                      80 * GUIUtilities.SizeFactor,
                      40 * GUIUtilities.SizeFactor,
                      140 * GUIUtilities.SizeFactor,
                      140 * GUIUtilities.SizeFactor), "", icon);

        GUIUtilities.Text(new Rect(
                              300 * GUIUtilities.SizeFactor,
                              35 * GUIUtilities.SizeFactor,
                              Screen.width - (300 * GUIUtilities.SizeFactor),
                              GUIUtilities.getSize(headlineStyle, new GUIContent(this.headline)).y), this.headline, this.headlineStyle);
    }
コード例 #3
0
 public override int getHeight()
 {
     return((int)(GUIUtilities.getSize(bigHeadlineStyle, new GUIContent(headLine)).y + 80 * GUIUtilities.SizeFactor));
 }
コード例 #4
0
    private void renderTutorialview()
    {
        if (GUIUtilities.ButtonWithText(new Rect(
                                            40 * SizeFactor,
                                            20 * SizeFactor,
                                            100 * SizeFactor,
                                            50 * SizeFactor), "Back", smallButtonStyle, buttonTextStyle))
        {
            state = STATES.LISTVIEW;
        }

        if (GUIUtilities.ButtonWithText(new Rect(
                                            300 * SizeFactor + GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).x / 4,
                                            (150 + 20) * SizeFactor + GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y *2,
                                            100 * SizeFactor,
                                            50 * SizeFactor), "Start", smallButtonStyle, buttonTextStyle))
        {
#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN
            if (currentTutorial == TUTORIALS.VISUAL_SEARCH ||
                currentTutorial == TUTORIALS.INTERACTIVE_FURNITURE ||
                currentTutorial == TUTORIALS.LOCATION_BASED_AR)
            {
                Debug.LogError("This tutorial is currently not implemented for the Editor Preview and Windows/Mac Standalone, please try on a mobile device");
                return;
            }
#endif
            PlayerPrefs.SetInt("currentTutorial", (int)currentTutorial);
            Application.LoadLevel(getSceneName(currentTutorial));
        }


        GUI.Label(new Rect(
                      40 * SizeFactor,
                      90 * SizeFactor,
                      220 * SizeFactor,
                      220 * SizeFactor), "", getTutorialIcon(currentTutorial));

        GUIUtilities.Text(new Rect(
                              300 * SizeFactor,
                              100 * SizeFactor,
                              Screen.width - (300 * SizeFactor),
                              GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y)
                          , getTutorialName(currentTutorial), headlineTextStyle);

        GUIUtilities.Text(new Rect(
                              40 * SizeFactor,
                              350 * SizeFactor,
                              Screen.width - (40 * SizeFactor),
                              GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y)
                          , "Learn", headlineTextStyle);

        GUIUtilities.Text(new Rect(
                              40 * SizeFactor,
                              350 * SizeFactor + GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y,
                              Screen.width - (40 * SizeFactor),
                              GUIUtilities.getSize(descriptionTextStyle, new GUIContent(getTutorialName(currentTutorial))).y)
                          , getLearn(currentTutorial), learnDescriptionTextStyle);

        GUIUtilities.Text(new Rect(
                              40 * SizeFactor,
                              380 * SizeFactor + GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y * 4,
                              Screen.width - (40 * SizeFactor),
                              GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y)
                          , "Key methods", headlineTextStyle);

        GUIUtilities.Text(new Rect(
                              40 * SizeFactor,
                              380 * SizeFactor + GUIUtilities.getSize(headlineTextStyle, new GUIContent(getTutorialName(currentTutorial))).y * 5,
                              Screen.width - (40 * SizeFactor),
                              GUIUtilities.getSize(learnDescriptionTextStyle, new GUIContent(getTutorialName(currentTutorial))).y)
                          , getKeyMethods(currentTutorial), learnDescriptionTextStyle);
    }