Esempio n. 1
0
 private void Awake()
 {
     //Singleton code
     if (Instance != null && Instance != this)
     {
         Debug.LogError("Trying to instantiate a second singleton", gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Esempio n. 2
0
 // Token: 0x06000D33 RID: 3379 RVA: 0x0005B13C File Offset: 0x0005933C
 private void DrawScreenResChangePanel()
 {
     GUI.depth = 1;
     GUI.Label(new Rect(0f, 0f, this._rect.width, 56f), LocalizedStrings.ChangingScreenResolution, BlueStonez.tab_strip);
     GUI.BeginGroup(new Rect(16f, 55f, this._rect.width - 32f, this._rect.height - 56f - 54f), string.Empty, BlueStonez.window_standard_grey38);
     GUI.Label(new Rect(24f, 18f, 460f, 20f), LocalizedStrings.ChooseNewResolution + this._screenResText[this._newScreenResIndex] + " ?", BlueStonez.label_interparkbold_16pt_left);
     GUI.Label(new Rect(0f, 0f, this._rect.width - 32f, this._rect.height - 56f - 54f), ((int)this._screenResChangeDelay).ToString(), BlueStonez.label_interparkbold_48pt);
     GUI.EndGroup();
     if (GUITools.Button(new Rect(this._rect.width - 136f - 140f, this._rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.OkCaps), BlueStonez.button))
     {
         ScreenResolutionManager.SetResolution(this._newScreenResIndex, true);
         this._screenResChangeDelay = 0f;
         GuiLockController.ReleaseLock(GuiDepth.Popup);
     }
     if (GUITools.Button(new Rect(this._rect.width - 136f, this._rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.CancelCaps), BlueStonez.button))
     {
         this._screenResChangeDelay = 0f;
         GuiLockController.ReleaseLock(GuiDepth.Popup);
         if (this._isFullscreenBefore)
         {
             ScreenResolutionManager.IsFullScreen = true;
         }
     }
 }
Esempio n. 3
0
 // Token: 0x0600150F RID: 5391 RVA: 0x0000E1F5 File Offset: 0x0000C3F5
 public static void IncreaseResolution()
 {
     ScreenResolutionManager.SetResolution(ScreenResolutionManager.CurrentResolutionIndex + 1, Screen.fullScreen);
 }
Esempio n. 4
0
 public void set1920x1080()
 {
     ScreenResolutionManager.setWidth(1920);
     ScreenResolutionManager.setHeight(1080);
     ScreenResolutionManager.SetRes();
 }
Esempio n. 5
0
 public void set1366x768()
 {
     ScreenResolutionManager.setWidth(1366);
     ScreenResolutionManager.setHeight(768);
     ScreenResolutionManager.SetRes();
 }
Esempio n. 6
0
 public void set1280x720()
 {
     ScreenResolutionManager.setWidth(1280);
     ScreenResolutionManager.setHeight(720);
     ScreenResolutionManager.SetRes();
 }
Esempio n. 7
0
    // Token: 0x06000D38 RID: 3384 RVA: 0x0005B588 File Offset: 0x00059788
    private void DoVideoGroup()
    {
        GUI.skin = BlueStonez.Skin;
        Rect  position    = new Rect(1f, 1f, this._rect.width - 33f, this._rect.height - 55f - 47f);
        Rect  contentRect = new Rect(0f, 0f, (float)this._desiredWidth, this._rect.height + 200f - 55f - 46f - 20f);
        int   num         = 10;
        int   num2        = 150;
        int   num3        = this._screenResText.Length * 16 + 16;
        float width       = position.width - 8f - 8f - 20f;

        if (!Application.isWebPlayer || this.showResolutions)
        {
            contentRect.height += (float)(this._screenResText.Length * 16);
        }
        this._scrollVideo = GUITools.BeginScrollView(position, this._scrollVideo, contentRect, false, false, true);
        GUI.enabled       = true;
        int num4 = UnityGUI.Toolbar(new Rect(0f, 5f, position.width - 10f, 22f), this._currentQuality, this.qualitySet, this.qualitySet.Length, BlueStonez.tab_medium);

        if (num4 != this._currentQuality)
        {
            this.SetCurrentQuality(num4);
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        if (OptionsPanelGUI.HorizontalScrollbar(new Rect(8f, 30f, width, 30f), LocalizedStrings.TextureQuality, ref this._textureQuality, 0f, 5f))
        {
            this.graphicsChanged = true;
            this.SetCurrentQuality(this.qualitySet.Length - 1);
        }
        if (OptionsPanelGUI.HorizontalGridbar(new Rect(8f, 60f, width, 30f), LocalizedStrings.VSync, ref this._vsync, this.vsyncSet))
        {
            this.graphicsChanged = true;
            this.SetCurrentQuality(this.qualitySet.Length - 1);
        }
        if (OptionsPanelGUI.HorizontalGridbar(new Rect(8f, 90f, width, 30f), LocalizedStrings.AntiAliasing, ref this._antiAliasing, this.antiAliasingSet))
        {
            this.graphicsChanged = true;
            this.SetCurrentQuality(this.qualitySet.Length - 1);
        }
        int num5 = 130;

        if (!ApplicationDataManager.IsMobile)
        {
            this._postProcessing = GUI.Toggle(new Rect(8f, (float)num5, width, 30f), ApplicationDataManager.ApplicationOptions.VideoPostProcessing, LocalizedStrings.ShowPostProcessingEffects, BlueStonez.toggle);
            if (this._postProcessing != ApplicationDataManager.ApplicationOptions.VideoPostProcessing)
            {
                this.graphicsChanged = true;
                this.SetCurrentQuality(this.qualitySet.Length - 1);
            }
            num5 += 30;
        }
        bool flag = GUI.Toggle(new Rect(8f, (float)num5, width, 30f), ApplicationDataManager.ApplicationOptions.VideoShowFps, LocalizedStrings.ShowFPS, BlueStonez.toggle);

        if (flag != ApplicationDataManager.ApplicationOptions.VideoShowFps)
        {
            ApplicationDataManager.ApplicationOptions.VideoShowFps = flag;
            GameData.Instance.VideoShowFps.Fire();
        }
        num5 += 30;
        if (!Application.isWebPlayer || this.showResolutions)
        {
            this.DrawGroupControl(new Rect(8f, (float)num5, width, (float)num3), LocalizedStrings.ScreenResolution, BlueStonez.label_group_interparkbold_18pt);
            GUI.BeginGroup(new Rect(8f, (float)num5, width, (float)num3));
            GUI.changed = false;
            Rect position2 = new Rect(10f, 10f, (float)(num + num2 * 2), (float)num3);
            int  num6      = GUI.SelectionGrid(position2, ScreenResolutionManager.CurrentResolutionIndex, this._screenResText, 1, BlueStonez.radiobutton);
            if (num6 != ScreenResolutionManager.CurrentResolutionIndex)
            {
                if (this.INSTANT_SCREEN_RES_CHANGE)
                {
                    ScreenResolutionManager.SetResolution(num6, Screen.fullScreen);
                }
                else
                {
                    this.ShowScreenResChangeConfirmation(ScreenResolutionManager.CurrentResolutionIndex, num6);
                }
            }
            GUI.EndGroup();
        }
        GUITools.EndScrollView();
    }