Ejemplo n.º 1
0
    public override void drawWindowContent(int width, int height)
    {
        GUI.Label(new Rect(10f, 48f, (float)width, 100f), MkTextProvider.getTextFromId("show_options_menu"), this.headlineStyle);
        GUI.BeginGroup(new Rect(100f, 100f, 400f, 500f));
        GUI.Label(new Rect(0.0f, -this.scrollPosition, 581f, this.maxScrollHeight), "Optionen");
        // this.maxScrollHeight = this.headlineStyle.CalcHeight(new GUIContent("credits_content"), 581f);
        GUI.EndGroup();

        if (!GUI.Button(new Rect(200f, 200f, 40f, 40f), "Ende"))
        {
            return;
        }
        this.showWindow = false;
    }
Ejemplo n.º 2
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;
         }
     }
 }
Ejemplo n.º 3
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;
     }
 }
Ejemplo n.º 4
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);
    }
Ejemplo n.º 5
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();
     }
 }