private CustomizerGestureModel processGesture(ITouch touch, CustomizerGestureModel gestureModel) { gestureModel.TouchDownStartPos = touch.position; if (isOverUI(touch)) { if (EventSystem.current.currentSelectedGameObject != null) { EquipmentIcon component = EventSystem.current.currentSelectedGameObject.GetComponent <EquipmentIcon>(); if (component != null) { gestureModel.TouchDownStartArea = AreaTouchedEnum.INVENTORY_BUTTON; gestureModel.DragIconTexture = component.GetIcon() as Texture2D; gestureModel.ItemId = component.EquipmentId; gestureModel.IsEquippable = component.IsEquippable; } } } else if (isTouchBlockedByUIControls(touch)) { gestureModel.TouchDownStartArea = AreaTouchedEnum.CLICK_BLOCKING_UI; } else { gestureModel.TouchDownStartArea = AreaTouchedEnum.PENGUIN_PREVIEW_ROTATION_AREA; } return(gestureModel); }
private void showRemoveItemPrompt(PromptLoaderCMD promptLoader, EquipmentIcon iconItem) { Texture2D texture2D = (Texture2D)iconItem.GetIcon(); Sprite sprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f)); promptLoader.PromptData.SetImage(DPrompt.PROMPT_IMAGE_DEFAULT, sprite); Service.Get <PromptManager>().ShowPrompt(promptLoader.PromptData, delegate(DPrompt.ButtonFlags pressed) { deleteConfirmationButton(pressed, iconItem.EquipmentId); }, promptLoader.Prefab); }