Initial commit

Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com>
Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com>
Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com>
Co-Authored-By: Michael Cartner <32543275+michaelcartner@users.noreply.github.com>
This commit is contained in:
Eric Tuvesson
2023-09-05 12:08:55 +02:00
commit 53f0d6320e
2704 changed files with 76354 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
---
title: Rating
hide_title: true
---
# Rating
A UI component for selecting a rating from 1 to 5 with stars. Adding more starts or a different scale can easily be modified in the component. This UI component uses the **Icon node** to show the stars, and can be changed to other icons as well like hearts, smileys, etc. if preferred.
<div className="ndl-image-with-background l">
![](/library/prefabs/rating/rating.png)
</div>
After cloning the prefab you will see a logic component called **Rating** in your project. Place it into the dom-tree to render it.
You can both set a rating to be displayed via the **Rating Input**, and get the selected rating from the **Rating Output** as shown on the image below.
The **Rating** output is a number between 1-5 by default.
<div className="ndl-image-with-background xl">
![](/library/prefabs/rating/rating_example.png)
</div>