﻿// Decompiled with JetBrains decompiler
// Type: UICraftingGridItem
// Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 19851F1B-4780-4223-BA01-2C20F2CD781E
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\Assembly-CSharp.dll

using UnityEngine;

[FlashImportComponent]
public class UICraftingGridItem : UIInventoryGridItem
{
  protected override void SetupButtonEventsForMobile(bool isPartOfGrid)
  {
    if (isPartOfGrid)
    {
      WBUIDraggableButton wbuiDraggableButton = this.Button as WBUIDraggableButton;
      if (Object.op_Inequality((Object) wbuiDraggableButton, (Object) null))
      {
        wbuiDraggableButton.m_methodToInvokeOnBeginDrag = "GridButtonDragged";
        wbuiDraggableButton.StartDragEvent = WBUIDraggableButton.StartEvent.Drag;
      }
      this.Button.scriptWithMethodToInvoke = (MonoBehaviour) this;
      this.Button.methodToInvoke = "GridButtonTriggered";
      this.Button.whenToInvoke = POINTER_INFO.INPUT_EVENT.TAP;
    }
    else
    {
      WBUIDraggableButton wbuiDraggableButton = this.Button as WBUIDraggableButton;
      AssertionGameModule.Assert(Object.op_Inequality((Object) wbuiDraggableButton, (Object) null), false, "Button is not a WBUIDraggableButton. It needs to be.");
      if (!Object.op_Inequality((Object) wbuiDraggableButton, (Object) null))
        return;
      wbuiDraggableButton.scriptWithMethodToInvoke = (MonoBehaviour) this;
      wbuiDraggableButton.methodToInvoke = "CursorButtonTriggered";
      wbuiDraggableButton.whenToInvoke = POINTER_INFO.INPUT_EVENT.TAP;
      wbuiDraggableButton.m_methodToInvokeOnBeginDrag = "CursorButtonDragged";
      wbuiDraggableButton.StartDragEvent = WBUIDraggableButton.StartEvent.Drag;
    }
  }

  protected override void UpdateLock()
  {
    this._data.RaceLocked = false;
    this._data.LevelLocked = false;
    base.UpdateLock();
  }
}
