Example #1
0
    // Token: 0x060009AC RID: 2476 RVA: 0x0003D234 File Offset: 0x0003B434
    public override void Draw(Rect rect)
    {
        GUI.BeginGroup(rect);
        int num = 30;

        if (this._prices.Exists((ItemPrice p) => p.Duration != BuyingDurationType.Permanent))
        {
            GUI.Label(new Rect(0f, 0f, rect.width, 16f), "Limited Use", BlueStonez.label_interparkbold_16pt_left);
            foreach (ItemPrice itemPrice in this._prices)
            {
                if (itemPrice.Duration != BuyingDurationType.Permanent)
                {
                    GUIContent guicontent = new GUIContent(ShopUtils.PrintDuration(itemPrice.Duration));
                    if (itemPrice.Currency == UberStrikeCurrencyType.Points && this._levelLocked)
                    {
                        GUI.enabled        = false;
                        guicontent.tooltip = this._tooltip;
                    }
                    if (GUI.Toggle(new Rect(0f, (float)num, rect.width, 20f), this._selectedPrice == itemPrice, guicontent, BlueStonez.toggle) && itemPrice != this._selectedPrice)
                    {
                        this._onPriceSelected(itemPrice);
                    }
                    num         = base.DrawPrice(itemPrice, rect.width * 0.5f, num);
                    GUI.enabled = true;
                }
            }
            num += 20;
        }
        if (this._prices.Exists((ItemPrice p) => p.Duration == BuyingDurationType.Permanent))
        {
            GUI.Label(new Rect(0f, (float)num, rect.width, 16f), "Unlimited Use", BlueStonez.label_interparkbold_16pt_left);
            num += 30;
            foreach (ItemPrice itemPrice2 in this._prices)
            {
                if (itemPrice2.Duration == BuyingDurationType.Permanent)
                {
                    string empty = string.Empty;
                    if (GUI.Toggle(new Rect(0f, (float)num, rect.width, 20f), this._selectedPrice == itemPrice2, new GUIContent(LocalizedStrings.Permanent, empty), BlueStonez.toggle) && itemPrice2 != this._selectedPrice)
                    {
                        this._onPriceSelected(itemPrice2);
                    }
                    num = base.DrawPrice(itemPrice2, rect.width * 0.5f, num);
                }
            }
        }
        base.Height = num;
        GUI.EndGroup();
    }
Example #2
0
 // Token: 0x060009B4 RID: 2484 RVA: 0x0003D5E8 File Offset: 0x0003B7E8
 private void OnGUI()
 {
     this._rect = this._rect.Lerp(this._finalRect, Time.deltaTime * 5f);
     if (this.IsEnabled && !PanelManager.IsAnyPanelOpen)
     {
         GUI.color = new Color(1f, 1f, 1f, this.Alpha);
         GUI.BeginGroup(this._rect, BlueStonez.box_grey_outlined);
         this._item.DrawIcon(new Rect(20f, 10f, 48f, 48f));
         GUI.Label(new Rect(75f, 15f, 200f, 30f), this._item.View.Name, BlueStonez.label_interparkbold_13pt_left);
         GUI.Label(new Rect(20f, 70f, 220f, 50f), this._description, BlueStonez.label_interparkmed_11pt_left);
         if (this._duration != BuyingDurationType.None)
         {
             GUIContent content = new GUIContent(ShopUtils.PrintDuration(this._duration), ShopIcons.ItemexpirationIcon);
             GUI.Label(new Rect(75f, 40f, 200f, 20f), content, BlueStonez.label_interparkbold_11pt_left);
         }
         else if (this._daysLeft == 0)
         {
             GUIContent content2 = new GUIContent(ShopUtils.PrintDuration(BuyingDurationType.Permanent), ShopIcons.ItemexpirationIcon);
             GUI.Label(new Rect(75f, 40f, 200f, 20f), content2, BlueStonez.label_interparkmed_11pt_left);
         }
         else if (this._daysLeft > 0)
         {
             GUIContent content3 = new GUIContent(string.Format(LocalizedStrings.NDaysLeft, this._daysLeft), ShopIcons.ItemexpirationIcon);
             GUI.Label(new Rect(75f, 40f, 200f, 20f), content3, BlueStonez.label_interparkbold_11pt_left);
         }
         if (this.OnDrawItemDetails != null)
         {
             this.OnDrawItemDetails();
         }
         GUI.Label(new Rect(20f, 200f, 210f, 20f), LocalizedStrings.LevelRequired + this._level, BlueStonez.label_interparkbold_11pt_left);
         if (this._criticalHit > 0)
         {
             GUI.Label(new Rect(20f, 218f, 210f, 20f), LocalizedStrings.CriticalHitBonus + this._criticalHit + "%", BlueStonez.label_interparkmed_11pt_left);
         }
         GUI.EndGroup();
         this.OnDrawTip();
         GUI.color = Color.white;
         if (this._alpha - Time.time < 0f)
         {
             this.IsEnabled = false;
         }
     }
 }
    // Token: 0x06000C4E RID: 3150 RVA: 0x00052BF0 File Offset: 0x00050DF0
    private void DrawItemsTableContent(Rect scrollViewRect)
    {
        GUI.Box(scrollViewRect, GUIContent.none, BlueStonez.window_standard_grey38);
        if (this._itemTransactions.CurrentPage != null)
        {
            this._scrollControls = GUITools.BeginScrollView(scrollViewRect.Expand(0, -1), this._scrollControls, new Rect(0f, 0f, scrollViewRect.width - 17f, (float)this._itemTransactions.CurrentPage.ItemTransactions.Count * 23f), false, false, true);
            float num = 0f;
            foreach (ItemTransactionView itemTransactionView in this._itemTransactions.CurrentPage.ItemTransactions)
            {
                IUnityItem itemInShop = Singleton <ItemManager> .Instance.GetItemInShop(itemTransactionView.ItemId);

                string text = (itemInShop == null) ? string.Format("item[{0}]", itemTransactionView.ItemId) : TextUtility.ShortenText(itemInShop.Name, 20, true);
                GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Items, 0, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Items, 0, scrollViewRect.width), 23f), itemTransactionView.WithdrawalDate.ToString(TransactionHistory.DATE_FORMAT), BlueStonez.label_interparkmed_11pt);
                GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Items, 1, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Items, 1, scrollViewRect.width), 23f), text, BlueStonez.label_interparkmed_11pt);
                GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Items, 2, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Items, 2, scrollViewRect.width), 23f), itemTransactionView.Points.ToString(), BlueStonez.label_interparkmed_11pt);
                GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Items, 3, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Items, 3, scrollViewRect.width), 23f), itemTransactionView.Credits.ToString(), BlueStonez.label_interparkmed_11pt);
                GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Items, 4, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Items, 4, scrollViewRect.width), 23f), ShopUtils.PrintDuration(itemTransactionView.Duration), BlueStonez.label_interparkmed_11pt);
                num += 23f;
            }
            GUITools.EndScrollView();
        }
    }