public void SceneObjectDroppedFromCatalog(BaseEventData data)
    {
        CatalogItemAdapter adapter = sceneCatalogController.GetLastCatalogItemDragged();

        if (adapter != null)
        {
            SetCatalogItemToShortcut(adapter.GetContent());
        }
    }
Ejemplo n.º 2
0
    public void SceneObjectDropped(BaseEventData data)
    {
        CatalogItemAdapter adapter     = catalogGroupListView.GetLastCatalogItemDragged();
        CatalogItem        catalogItem = adapter.GetContent();

        if (adapter.thumbnailImg.enabled)
        {
            Texture texture = adapter.thumbnailImg.texture;
            SetQuickBarShortcut(catalogItem, lastIndexDroped, texture);
        }
    }
    public void CatalogitemDropped()
    {
        CatalogItemAdapter adapter = catalogGroupListView.GetLastCatalogItemDragged();

        if (adapter == null)
        {
            return;
        }
        CatalogItem catalogItem = adapter.GetContent();

        OnCatalogItemDropped?.Invoke(catalogItem);
    }
    public void SceneObjectDropped()
    {
        CatalogItemAdapter adapter = catalogGroupListView.GetLastSceneObjectDragged();

        if (adapter == null)
        {
            return;
        }
        SceneObject sceneObject = adapter.GetContent();

        OnSceneObjectDropped?.Invoke(sceneObject);
    }
Ejemplo n.º 5
0
    public void SceneObjectDroppedFromCatalog(BaseEventData data)
    {
        CatalogItemAdapter adapter = sceneCatalogController.GetLastCatalogItemDragged();

        if (adapter != null &&
            adapter.thumbnailImg != null &&
            adapter.thumbnailImg.enabled)
        {
            Texture     texture     = adapter.thumbnailImg.texture;
            CatalogItem catalogItem = adapter.GetContent();
            SetQuickBarShortcut(catalogItem, lastIndexDroped, texture);
        }
    }
Ejemplo n.º 6
0
    private void AdapterStartDragging(CatalogItem catalogItemClicked, CatalogItemAdapter adapter, BaseEventData data)
    {
        PointerEventData eventData = data as PointerEventData;

        if (draggedObject == null)
        {
            draggedObject = Instantiate(adapter.gameObject, generalCanvas.transform);
        }

        CatalogItemAdapter newAdapter = draggedObject.GetComponent <CatalogItemAdapter>();

        RectTransform adapterRT = adapter.GetComponent <RectTransform>();

        newAdapter.SetContent(adapter.GetContent());
        newAdapter.EnableDragMode(adapterRT.sizeDelta);
        catalogItemAdapterDragged = newAdapter;

        OnStopInput?.Invoke();
    }
Ejemplo n.º 7
0
 private void ShowTooltipForCatalogItemAdapter(PointerEventData data, CatalogItemAdapter adapter)
 {
     controllers.tooltipController.SetTooltipText(adapter.GetContent().name);
     controllers.tooltipController.ShowTooltip(data, catalogItemTooltipOffset);
 }