Skip to content

AnastasiaValishina/unity-ui-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rewards Window and Tooltip Implementation

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.

Rewards Window

Mockup: _ReferenceArt\screen_*.png

Class: RewardsWindow

Features:

  • 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.

Reward Tooltip

Mockup: _ReferenceArt\tooltip_*.png

Functionality:

  • 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).

Features:

  • 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

About

Test task for a position of UI Unity Developer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published