// Token: 0x060028D1 RID: 10449 RVA: 0x000953FC File Offset: 0x000935FC
    public void Setup(float fSeconds, string strText)
    {
        Vector2         size      = base.transform.parent.GetComponent <global::dfPanel>().Size;
        global::dfPanel component = base.GetComponent <global::dfPanel>();
        Vector2         vector    = this.labelText.Font.MeasureText(strText, this.labelText.FontSize, this.labelText.FontStyle);

        this.labelText.Width = vector.x + 16f;
        component.Width      = this.labelText.RelativePosition.x + this.labelText.Width + 8f;
        Vector2 vector2 = default(Vector2);

        vector2.x  = size.x + Random.Range(-16f, 16f);
        vector2.y  = size.y * 0.7f + Random.Range(-16f, 16f);
        vector2.y += ((float)global::PopupInventory.iYPos / 6f - 0.5f) * size.y * 0.2f;
        component.RelativePosition = vector2;
        global::PopupInventory.iYPos++;
        if (global::PopupInventory.iYPos > 5)
        {
            global::PopupInventory.iYPos = 0;
        }
        Vector3 endValue = this.tweenOut.EndValue;

        endValue.y             = Random.Range(-100f, 100f);
        this.tweenOut.EndValue = endValue;
        component.BringToFront();
        this.labelText.Text = strText;
        base.Invoke("PlayOut", fSeconds);
    }
Esempio n. 2
0
 // Token: 0x06002902 RID: 10498 RVA: 0x0009626C File Offset: 0x0009446C
 private void HideAllBut(global::dfPanel but)
 {
     if (this.screenServers && this.screenServers != but)
     {
         this.screenServers.Hide();
     }
     if (this.screenOptions && this.screenOptions != but)
     {
         this.screenOptions.Hide();
     }
 }
    // Token: 0x060028D4 RID: 10452 RVA: 0x000955BC File Offset: 0x000937BC
    public void Setup(float fSeconds, string strIcon, string strText)
    {
        Vector2         size      = base.transform.parent.GetComponent <global::dfPanel>().Size;
        global::dfPanel component = base.GetComponent <global::dfPanel>();
        Vector2         vector    = this.labelText.Font.MeasureText(strText, this.labelText.FontSize, this.labelText.FontStyle);

        this.labelText.Width = vector.x + 16f;
        component.Width      = this.labelText.RelativePosition.x + this.labelText.Width + 8f;
        Vector2 vector2 = default(Vector2);

        vector2.x = (size.x - component.Width) / 2f + Random.Range(-32f, 32f);
        vector2.y = component.Height * -1f + Random.Range(-32f, 32f);
        component.RelativePosition = vector2;
        this.labelIcon.Text        = strIcon;
        this.labelText.Text        = strText;
        component.BringToFront();
        base.Invoke("PlayOut", fSeconds);
    }
    // Token: 0x060028B8 RID: 10424 RVA: 0x00094CA0 File Offset: 0x00092EA0
    public void SetVisible(bool visible)
    {
        this.entryLabel.Text = ((!this.changingEntry) ? "Password:"******"New Password:");
        global::dfPanel component = base.GetComponent <global::dfPanel>();

        if (visible)
        {
            component.Show();
            component.BringToFront();
            this.passwordInput.Text = string.Empty;
            this.passwordInput.Focus();
        }
        else
        {
            component.Hide();
            this.passwordInput.Unfocus();
        }
        base.gameObject.SetActive(visible);
    }
Esempio n. 5
0
    // Token: 0x060044B4 RID: 17588 RVA: 0x00100BB0 File Offset: 0x000FEDB0
    public global::dfControl AddTabPage()
    {
        global::dfPanel dfPanel = (from i in this.controls
                                   where i is global::dfPanel
                                   select i).FirstOrDefault() as global::dfPanel;
        string          name     = "Tab Page " + (this.controls.Count + 1);
        global::dfPanel dfPanel2 = base.AddControl <global::dfPanel>();

        dfPanel2.name         = name;
        dfPanel2.Atlas        = this.Atlas;
        dfPanel2.Anchor       = global::dfAnchorStyle.All;
        dfPanel2.ClipChildren = true;
        if (dfPanel != null)
        {
            dfPanel2.Atlas            = dfPanel.Atlas;
            dfPanel2.BackgroundSprite = dfPanel.BackgroundSprite;
        }
        this.arrangeTabPages();
        this.Invalidate();
        return(dfPanel2);
    }
Esempio n. 6
0
    // Token: 0x060044BB RID: 17595 RVA: 0x00100ED0 File Offset: 0x000FF0D0
    private void arrangeTabPages()
    {
        if (this.padding == null)
        {
            this.padding = new RectOffset(0, 0, 0, 0);
        }
        Vector3 relativePosition;

        relativePosition..ctor((float)this.padding.left, (float)this.padding.top);
        Vector2 size;

        size..ctor(this.size.x - (float)this.padding.horizontal, this.size.y - (float)this.padding.vertical);
        for (int i = 0; i < this.controls.Count; i++)
        {
            global::dfPanel dfPanel = this.controls[i] as global::dfPanel;
            if (dfPanel != null)
            {
                dfPanel.Size             = size;
                dfPanel.RelativePosition = relativePosition;
            }
        }
    }