예제 #1
0
 public void myGUIPauseMenu()
 {
     if (!activate == false)
     {
         Rect position = this.drawAreaRect;
         GUI.BeginGroup(position);
         GUI.Box(new Rect(0, 0, 500, 300), string.Empty, this.bgStyle);
         GUI.Label(new Rect(0f, 0f, 20f, 10f), Label1, this.labelStyle);
         GUI.depth = 3;
         if (GUI.Button(new Rect(100, 100, 100, 100), "Credits") && !this.isWindowActive())
         {
             MkCreditsWindow.instance.showWindow = !MkCreditsWindow.instance.showWindow;
         }
         if (GUI.Button(new Rect(150, 150, 100, 100), "Optiones") && !this.isWindowActive())
         {
             MkOptionWindow.instance.showWindow = !MkOptionWindow.instance.showWindow;
             MkInGameGUI.showInfoBox(MkTextProvider.getTextFromId("gravel_pit_start"), false, 10f);
         }
         if (GUI.Button(new Rect(200, 200, 100, 100), "Profile"))
         {
             MkUserInterface.instance.showScreen(MkUserInterface.MkScreenType.ProfileChooser);
         }
         GUI.EndGroup();
     }
 }
예제 #2
0
 public void OnApplicationQuit()
 {
     if (Application.isEditor || this.allowQuit)
     {
         return;
     }
     Application.CancelQuit();
     MkDialogue.showDialogue(MkTextProvider.getTextFromId("exit_game_question"), new MkDialogue.MkApplyCallback(this.exitApplicationCallback), (MkDialogue.MkApplyCallback)null, true);
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     //this._playLabel = ExtensionMethods.FindComponent<UILabel>(this.transform, "TestLabel", true);
     //this._isFullscreenCheckbox = GameObject.Find("chkFullsreen").GetComponent<UICheckbox>();
     this._playLabel = GameObject.Find("TestLabel").GetComponent <UILabel>();
     _playLabel.text = MkTextProvider.getTextFromId("game_start");
     if ((UnityEngine.Object) this._playLabel != (UnityEngine.Object)null)
     {
         UIEventListener.Get(this._playLabel.gameObject).onClick += new UIEventListener.VoidDelegate(this.StartGame);
     }
 }
예제 #4
0
    public override void drawWindowContent(int width, int height)
    {
        GUI.Label(new Rect(88f, 48f, (float)width, 30f), "Credits", this.headlineStyle);
        GUI.BeginGroup(new Rect(100f, 100f, 400f, 200f));
        GUI.Label(new Rect(0.0f, -this.scrollPosition, 581f, this.maxScrollHeight), MkTextProvider.getTextFromId("credits_content"));
        this.maxScrollHeight = this.headlineStyle.CalcHeight(new GUIContent(MkTextProvider.getTextFromId("credits_content")), 581f);
        GUI.EndGroup();

        if (!GUI.Button(new Rect(200f, 200f, 40f, 40f), "Ende"))
        {
            return;
        }
        this.showWindow = false;
    }
예제 #5
0
 public void Update()
 {
     this.dialogueHeigtState = Mathf.Clamp01(this.dialogueHeigtState + (!this.dialogueEnabled ? -Time.deltaTime : Time.deltaTime));
     //this.applyBtnDown = Input.GetButtonDown("Fire1");
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         escapeEnabled = true;
         if (escapeEnabled)
         {
             showDiag(MkTextProvider.getTextFromId("exit_game_question"));
         }
         else
         {
             MkDialogue.instance.dialogueEnabled = false;
         }
     }
 }
예제 #6
0
 void OnMouseDown()
 {
     if (MKGUIPauseDialog.instance.activate == false)
     {
         MKGUIPauseDialog.instance.activate = true;
         MKGUIPauseDialog.instance.menuD    = MKGUIPauseDialog.Menu.InGame;
         // activateDialog.myGUI();
         pauseIsClicked = true;
     }
     else
     {
         MKGUIPauseDialog.instance.activate = false;
         MKGUIPauseDialog.instance.menuD    = MKGUIPauseDialog.Menu.Pause;
         Debug.Log(MkTextProvider.getTextFromId("yes"));
         pauseIsClicked = false;
     }
 }
예제 #7
0
    // Use this for initialization
    void Start()
    {
        string  str1       = MkTextProvider.getTextFromId("last_site");
        UILabel component1 = labelHeadline;

        component1.text = str1;
        if (!(bool)((Object)this.atlas))
        {
            return;
        }
        this._fadeBackground       = NGUITools.AddSprite(this.gameObject, this.atlas, "black");
        this._fadeBackground.depth = -1;
        this._fadeBackground.name  = "FadeBackground";
        this._fadeBackground.alpha = this.fadeAlpha;
        this._fadeBackground.gameObject.SetActive(this.gameObject.activeSelf);
        this._fadeBackground.gameObject.AddComponent <BoxCollider>();
        this._fadeBackground.transform.localScale    = new Vector3(100, 200, 1f);
        this._fadeBackground.transform.localPosition = new Vector3(0.0f, 0.0f, -0.25f);
    }
예제 #8
0
 public void OnGUI()
 {
     if (dialogueEnabled && escapeEnabled)
     {
         // if ((double)this.dialogueHeight == -(double)this.dialogueDimension.y)
         //     return;
         GUI.BeginGroup(new Rect(Screen.width / 2 - dialogueDimension.x / 2, Screen.height / 2 - dialogueDimension.y / 2, dialogueDimension.x, dialogueDimension.y));
         GUI.Label(new Rect(0.0f, 0.0f, this.dialogueDimension.x, this.dialogueDimension.y), this.dialogueText, this.bgStyle);
         if (GUI.Button(new Rect(219f, 149f, 100f, 40f), MkTextProvider.getTextFromId("yes"), applyButtonStyle) || this.applyBtnDown)
         {
             this.applyBtnDown = false;
             MkDialogue.instance.dialogueEnabled = false;
             if (this.applyCallback != null)
             {
                 this.applyCallback();
             }
         }
         GUI.EndGroup();
     }
 }