Unity Version: 2022.3.27f1
Important! The tooltip close mechanism is implemented using Input.touchCount
for mobile devices. To ensure it works correctly in Unity, it should be tested in Simulator mode.
Mockup: _ReferenceArt\screen_*.png
Class: RewardsWindow
- The window accepts a title and an array of items that the player receives as rewards.
- Each reward is displayed with its icon.
- The window stretches the list of items across the full width of the screen, with padding according to the layout.
- If the rewards fit on the screen, they are centered.
- If the rewards do not fit, they are aligned to the left with a scrollable area that has soft-clipping.
Mockup: _ReferenceArt\tooltip_*.png
- A tooltip is displayed when a reward is long-tapped (the duration of the long tap can be made a constant in the code).
- The tooltip remains visible as long as the user is touching the screen (the user can move their finger across the screen, but the tooltip will disappear when the touch is released).
- The tooltip has a minimum size (
tooltip_small.png
), even if the text is short. - If there is a lot of text, the tooltip increases in height and width until it reaches the maximum size (
tooltip_big.png
). After that, the text inside the tooltip begins to auto-size. - The tooltip displays: item name, description, and icon