Esempio n. 1
0
 private void ForceScroll(float newHeight, bool useSpring)
 {
     //IL_0017: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0022: Unknown result type (might be due to invalid IL or missing references)
     //IL_002c: Expected O, but got Unknown
     //IL_0042: Unknown result type (might be due to invalid IL or missing references)
     //IL_0047: Unknown result type (might be due to invalid IL or missing references)
     //IL_004e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0053: Unknown result type (might be due to invalid IL or missing references)
     //IL_006a: Unknown result type (might be due to invalid IL or missing references)
     //IL_0070: Unknown result type (might be due to invalid IL or missing references)
     //IL_0090: Unknown result type (might be due to invalid IL or missing references)
     ScrollView.DisableSpring();
     if (useSpring)
     {
         SpringPanel.Begin(ScrollView.get_gameObject(), Vector3.get_up() * newHeight, 20f);
     }
     else
     {
         Vector2 clipOffset    = ScrollView.panel.clipOffset;
         Vector3 localPosition = ScrollViewTrans.get_localPosition();
         float   num           = localPosition.y + clipOffset.y;
         ScrollViewTrans.set_localPosition(Vector3.get_up() * newHeight);
         clipOffset.y = 0f - newHeight + num;
         ScrollView.panel.clipOffset = clipOffset;
     }
 }
Esempio n. 2
0
    public void UpdateWindowSize()
    {
        //IL_0012: Unknown result type (might be due to invalid IL or missing references)
        //IL_0017: Unknown result type (might be due to invalid IL or missing references)
        //IL_002b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0030: Unknown result type (might be due to invalid IL or missing references)
        //IL_0045: Unknown result type (might be due to invalid IL or missing references)
        //IL_004a: Unknown result type (might be due to invalid IL or missing references)
        //IL_005d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0062: Unknown result type (might be due to invalid IL or missing references)
        //IL_0077: Unknown result type (might be due to invalid IL or missing references)
        //IL_007c: Unknown result type (might be due to invalid IL or missing references)
        float   currentTotalHeight = CurrentTotalHeight;
        Vector4 baseClipRegion     = ScrollView.panel.baseClipRegion;
        float   num             = currentTotalHeight + baseClipRegion.y;
        Vector4 baseClipRegion2 = ScrollView.panel.baseClipRegion;
        float   num2            = num - baseClipRegion2.w * 0.5f;
        Vector3 localPosition   = ScrollViewTrans.get_localPosition();
        float   y            = localPosition.y;
        Vector2 clipOffset   = ScrollView.panel.clipOffset;
        float   num3         = num2 + (y + clipOffset.y);
        Vector2 clipSoftness = ScrollView.panel.clipSoftness;

        ForceScroll(num3 + clipSoftness.y, false);
        UpdateDummyDragScroll();
    }
Esempio n. 3
0
 private void AddNextChatItem(Action <ChatItem> initializer, bool topPosition, bool forceScroll)
 {
     //IL_0027: Unknown result type (might be due to invalid IL or missing references)
     //IL_002d: Expected O, but got Unknown
     //IL_0061: Unknown result type (might be due to invalid IL or missing references)
     //IL_0076: Unknown result type (might be due to invalid IL or missing references)
     //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d6: Unknown result type (might be due to invalid IL or missing references)
     //IL_011d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0122: Unknown result type (might be due to invalid IL or missing references)
     //IL_0137: Unknown result type (might be due to invalid IL or missing references)
     //IL_013c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0152: Unknown result type (might be due to invalid IL or missing references)
     //IL_0157: Unknown result type (might be due to invalid IL or missing references)
     //IL_016b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0170: Unknown result type (might be due to invalid IL or missing references)
     //IL_0186: Unknown result type (might be due to invalid IL or missing references)
     //IL_018b: Unknown result type (might be due to invalid IL or missing references)
     if (!(chatItemPrefab == null))
     {
         MessageItemListData messageItemListData = itemListData;
         ChatItem            chatItem            = null;
         chatItem = ResourceUtility.Realizes(chatItemPrefab, messageItemListData.rootObject.get_transform(), 5).GetComponent <ChatItem>();
         if (topPosition)
         {
             initializer(chatItem);
             float num = chatItem.height + 22f;
             messageItemListData.basePosY += num;
             chatItem.get_transform().set_localPosition(new Vector3(-15f, messageItemListData.basePosY, 0f));
             messageItemListData.currentTotalHeight += num;
         }
         else
         {
             if (messageItemListData.itemList.Count > 0)
             {
                 messageItemListData.currentTotalHeight += 22f;
             }
             float num2 = messageItemListData.currentTotalHeight - messageItemListData.basePosY;
             chatItem.get_transform().set_localPosition(new Vector3(-15f, 0f - num2, 0f));
             initializer(chatItem);
             messageItemListData.currentTotalHeight += chatItem.height;
         }
         UpdateDummyDragScroll();
         if (!topPosition && forceScroll)
         {
             float   currentTotalHeight = messageItemListData.currentTotalHeight;
             Vector4 baseClipRegion     = ScrollView.panel.baseClipRegion;
             float   num3            = currentTotalHeight + baseClipRegion.y;
             Vector4 baseClipRegion2 = ScrollView.panel.baseClipRegion;
             float   num4            = num3 - baseClipRegion2.w * 0.5f;
             Vector3 localPosition   = ScrollViewTrans.get_localPosition();
             float   y            = localPosition.y;
             Vector2 clipOffset   = ScrollView.panel.clipOffset;
             float   num5         = num4 + (y + clipOffset.y);
             Vector2 clipSoftness = ScrollView.panel.clipSoftness;
             float   num6         = num5 + clipSoftness.y;
             ForceScroll(num6 - messageItemListData.basePosY, true);
         }
         if (topPosition)
         {
             messageItemListData.itemList.Insert(0, chatItem);
         }
         else
         {
             messageItemListData.itemList.Add(chatItem);
         }
     }
 }