Beispiel #1
0
        public override void init(Dictionary <string, string> param)
        {
            this.param = param;

            GameObject g = Resources.Load(GameSetting.PATH_PREFAB + "Text") as GameObject;

            this.rootObject = (GameObject)Instantiate(g, new Vector3(0, 0.5f, -3.2f), Quaternion.identity);

            GUIText guiText = this.rootObject.GetComponent <GUIText> ().guiText;

            guiText.alignment = TextEnum.textAlignment(this.param["alignment"]);
            guiText.anchor    = TextEnum.textAnchor(this.param["anchor"]);


            string color = this.param ["color"];

            Color objColor = ColorX.HexToRGB(color);

            objColor.a    = 0;
            guiText.color = objColor;

            guiText.fontSize = int.Parse(this.param ["fontsize"]);

            this.guiScaler       = new GuiScaler(guiText);
            this.rootObject.name = this.name;

            if (this.param ["layer"] == "ui")
            {
                //タグをつける
                this.rootObject.tag = "ui";
            }
        }
Beispiel #2
0
    void Start()
    {
        GameObject obj = GameObject.Find("message_area");

        this.guiTextMessage = obj.GetComponent <GUIText> ();
        this.guiScaler      = new GuiScaler(this.guiTextMessage);
    }
Beispiel #3
0
 // Token: 0x06000602 RID: 1538 RVA: 0x000332A4 File Offset: 0x000314A4
 private void Update()
 {
     if (this.m_bindDialog.activeSelf)
     {
         this.UpdateBinding();
         return;
     }
     this.UpdateResSwitch(Time.deltaTime);
     AudioListener.volume         = this.m_volumeSlider.value;
     MusicMan.m_masterMusicVolume = this.m_musicVolumeSlider.value;
     AudioMan.SetSFXVolume(this.m_sfxVolumeSlider.value);
     this.SetQualityText(this.m_shadowQualityText, (int)this.m_shadowQuality.value);
     this.SetQualityText(this.m_lodText, (int)this.m_lod.value);
     this.SetQualityText(this.m_lightsText, (int)this.m_lights.value);
     this.SetQualityText(this.m_vegetationText, (int)this.m_vegetation.value);
     this.m_resButtonText.text = string.Concat(new object[]
     {
         this.m_selectedRes.width,
         "x",
         this.m_selectedRes.height,
         "  ",
         this.m_selectedRes.refreshRate,
         "hz"
     });
     this.m_guiScaleText.text = this.m_guiScaleSlider.value.ToString() + "%";
     GuiScaler.SetScale(this.m_guiScaleSlider.value / 100f);
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         this.OnBack();
     }
 }
Beispiel #4
0
 public static void Postfix(GuiScaler __instance, float scale)
 {
     if (scale == lastScale)
     {
         return;
     }
     lastScale = scale;
     RunicPower.Recreate();
 }
        private void OnStartPinch()
        {
            _Pinching = true;

            if (_Current)
            {
                DestroyImmediate(_Current.gameObject);
            }
            _Current = GUIQuad.Create();
            _Current.transform.SetParent(VR.Camera.Origin, false);
            DontDestroyOnLoad(_Current);
            _Current.transform.position    = Vector3.Lerp(VR.Mode.LeftHand.PinchPoint.position, VR.Mode.RightHand.PinchPoint.position, 0.5f);
            _Current.transform.rotation    = Quaternion.Slerp(VR.Mode.LeftHand.PinchPoint.rotation, VR.Mode.RightHand.PinchPoint.rotation, 0.5f) * Quaternion.Euler(0, 0, 90);
            _Current.transform.localScale *= Vector3.Distance(VR.Mode.LeftHand.PinchPoint.position, VR.Mode.RightHand.PinchPoint.position);

            _Scaler = new GuiScaler(_Current, VR.Mode.LeftHand.PinchPoint, VR.Mode.RightHand.PinchPoint);
        }
Beispiel #6
0
 // Token: 0x06000606 RID: 1542 RVA: 0x000334BC File Offset: 0x000316BC
 private void SaveSettings()
 {
     PlayerPrefs.SetFloat("MasterVolume", this.m_volumeSlider.value);
     PlayerPrefs.SetFloat("MouseSensitivity", this.m_sensitivitySlider.value);
     PlayerPrefs.SetFloat("MusicVolume", this.m_musicVolumeSlider.value);
     PlayerPrefs.SetFloat("SfxVolume", this.m_sfxVolumeSlider.value);
     PlayerPrefs.SetInt("ContinousMusic", this.m_continousMusic.isOn ? 1 : 0);
     PlayerPrefs.SetInt("InvertMouse", this.m_invertMouse.isOn ? 1 : 0);
     PlayerPrefs.SetFloat("GuiScale", this.m_guiScaleSlider.value / 100f);
     PlayerPrefs.SetInt("CameraShake", this.m_cameraShake.isOn ? 1 : 0);
     PlayerPrefs.SetInt("ShipCameraTilt", this.m_shipCameraTilt.isOn ? 1 : 0);
     PlayerPrefs.SetInt("QuickPieceSelect", this.m_quickPieceSelect.isOn ? 1 : 0);
     PlayerPrefs.SetInt("KeyHints", this.m_showKeyHints.isOn ? 1 : 0);
     PlayerPrefs.SetInt("DOF", this.m_dofToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("VSync", this.m_vsyncToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("Bloom", this.m_bloomToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("SSAO", this.m_ssaoToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("SunShafts", this.m_sunshaftsToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("AntiAliasing", this.m_aaToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("ChromaticAberration", this.m_caToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("MotionBlur", this.m_motionblurToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("SoftPart", this.m_softPartToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("Tesselation", this.m_tesselationToggle.isOn ? 1 : 0);
     PlayerPrefs.SetInt("ShadowQuality", (int)this.m_shadowQuality.value);
     PlayerPrefs.SetInt("LodBias", (int)this.m_lod.value);
     PlayerPrefs.SetInt("Lights", (int)this.m_lights.value);
     PlayerPrefs.SetInt("ClutterQuality", (int)this.m_vegetation.value);
     ZInput.SetGamepadEnabled(this.m_gamepadEnabled.isOn);
     ZInput.instance.Save();
     if (GameCamera.instance)
     {
         GameCamera.instance.ApplySettings();
     }
     if (CameraEffects.instance)
     {
         CameraEffects.instance.ApplySettings();
     }
     if (ClutterSystem.instance)
     {
         ClutterSystem.instance.ApplySettings();
     }
     if (MusicMan.instance)
     {
         MusicMan.instance.ApplySettings();
     }
     if (GameCamera.instance)
     {
         GameCamera.instance.ApplySettings();
     }
     if (KeyHints.instance)
     {
         KeyHints.instance.ApplySettings();
     }
     Settings.ApplyQualitySettings();
     this.ApplyMode();
     PlayerController.m_mouseSens   = this.m_sensitivitySlider.value;
     PlayerController.m_invertMouse = this.m_invertMouse.isOn;
     Localization.instance.SetLanguage(this.m_languageKey);
     GuiScaler.LoadGuiScale();
     PlayerPrefs.Save();
 }