Exemple #1
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     text = (TextUI)target;
     if (GUILayout.Button("FormatText"))
     {
         text.Format();
     }
     if (GUILayout.Button("TranslateThis"))
     {
         text.TranslateThis();
     }
     if (GUILayout.Button("TranslateAllInScene"))
     {
         text.TranslateAllInScene();
     }
     if (GUILayout.Button("renameAllTextObject"))
     {
         text.renameAllTextObject();
     }
     if (GUILayout.Button("Setup_DialogID"))
     {
         text.SetupDialogIDFromGameObject();
     }
 }
Exemple #2
0
    void Awake()
    {
        Screen.SetResolution(1366,768, false);
        name = "TitleMenu";
        base.Setup();
        SETUP = Resources.Load ("Tuning/GameSetup") as GameSetup;
        Chooser = FETool.findWithinChildren(gameObject, "LevelChooser").GetComponent<LevelChooser>();
        SETUP.startTranslate(SETUP.ChosenLanguage);
        SETUP.translateSceneText();
        levelInformations = new List<LevelInfo> ();

        if (GameObject.Find("Frameworks") == null)
        {
            GameObject fmObj = Instantiate(Resources.Load("Presets/Frameworks")) as GameObject;
            fmObj.name = "Frameworks";
        }

        Chooser.Setup ();
        awayPlace = FETool.findWithinChildren(gameObject, "AwayPlace");
        frontPlace = FETool.findWithinChildren(gameObject, "FrontPlace");
        Credits = FETool.findWithinChildren(gameObject, "Credits").GetComponent<SubMenu>();
        Landing = FETool.findWithinChildren(gameObject, "Landing").GetComponent<SubMenu>();
        LevelChooser = FETool.findWithinChildren(gameObject, "LevelChooser").GetComponent<SubMenu>();
        Options = FETool.findWithinChildren(gameObject, "Options").GetComponent<SubMenu>();
        versionDisplay = FETool.findWithinChildren(gameObject, "Landing/Underpanel/GAME_VERSION").GetComponent<TextUI>();

        SubMenu[] subMn = GetComponentsInChildren<SubMenu>();
        foreach (SubMenu sub in subMn)
        {
            sub.SetupSub(this);
            sub.setupBtn();
        }
        if (Input.GetJoystickNames().Length > 0)
        {
            padEntered = true;
            changeState(MenuStates.Start);
        }
        versionDisplay.TranslateThis();
        InvokeRepeating("checkPadMenu", 0f, 0.5f);
        TranslateAllInScene();
        versionDisplay.text += SETUP.gameversion;
        GameEventManager.TriggerGameStart("MainTitle");
        //		StartCoroutine("DelayMusic");
    }