WOrking card dragging, slotting, previewing
This commit is contained in:
@@ -82,17 +82,37 @@ namespace UI.CardSystem
|
||||
/// </summary>
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
// During reveal flow (before placed in slot), ignore clicks
|
||||
// Let the parent FlippableCard handle them
|
||||
Debug.Log($"[CLICK-TRACE-ALBUMCARD] OnPointerClick on {name}, _parentSlot={((_parentSlot != null) ? _parentSlot.name : "NULL")}, _isEnlarged={_isEnlarged}, position={eventData.position}");
|
||||
|
||||
// During reveal flow (before placed in slot), forward clicks to parent FlippableCard
|
||||
if (_parentSlot == null)
|
||||
{
|
||||
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - No parent slot, forwarding click to parent FlippableCard");
|
||||
|
||||
// Find parent FlippableCard and forward the click
|
||||
FlippableCard parentFlippable = GetComponentInParent<FlippableCard>();
|
||||
if (parentFlippable != null)
|
||||
{
|
||||
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Found parent FlippableCard, calling OnPointerClick");
|
||||
parentFlippable.OnPointerClick(eventData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[CLICK-TRACE-ALBUMCARD] {name} - No parent FlippableCard found!");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Has parent slot, processing click");
|
||||
|
||||
if (_isEnlarged)
|
||||
{
|
||||
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Is enlarged, requesting shrink");
|
||||
OnShrinkRequested?.Invoke(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Is normal size, requesting enlarge");
|
||||
OnEnlargeRequested?.Invoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user