Logo
UI Elements

Showcase Panel

An animated display panel

Overview

Showcase Panel displays a list of items with animated transitions, timed cycling, hover based previewing, and link or event execution.

This component is ideal for shortcuts and social media links.


Properties

Content

NameTypeDescription
currentIndexintCurrently displayed item index
itemsList<Item>List of showcase entries

Item

FieldTypeDescription
titlestringButton label text
urlstringURL opened when clicked
iconSpriteIcon shown in the button
backgroundSpriteBackground image for the panel
shadowColorColorShadow tint for backgroundShadow
descriptionstringDescription text displayed in the panel
onClickUnityEventCallback executed when item button is clicked
buttonButtonRuntime generated button reference

Settings

NameTypeDescription
useUnscaledTimeboolUses unscaled delta time for animations
setWithTimerboolAutomatically cycles items over time
timerfloatSeconds before moving to next item
animationDurationfloatDuration for slide in and out transitions
slideOffsetVector2Offset used for text slide animations

References

NameTypeDescription
buttonParentTransformParent object that holds generated item buttons
buttonPresetGameObjectPrefab used to create each item button
textDisplayTextMeshProUGUIDisplays the item description
backgroundImageImageImage used as background
backgroundShadowImageShadow tint behind background image

Public Methods

NameParametersDescription
Initialize()NoneRe builds buttons and resets content
SetItemContent(index)intUpdates displayed text and background
ShowCurrentItem()NoneRuns full update and in animation
HighlightCurrentButton()NoneSets Highlighted state on item button
SetButtonsInteractable(value, except)bool, ButtonEnables or disables all buttons

Code Example

ShowcasePanelExample.cs
using UnityEngine;
using Evo.UI;

public class ShowcasePanelExample : MonoBehaviour
{
    public ShowcasePanel panel;

    void Start()
    {
        // Automatically rotate items
        panel.setWithTimer = true;
        panel.timer = 4;
    }
}

On this page