-
Notifications
You must be signed in to change notification settings - Fork 1
Components
This page summaries the various UI elements in the app.
A panel item is the basic component to be displayed on a 2D canvas. It contains a value and some accompanying text, and its sub classes should implement SetValue() and SetText().
The slide bar consists of two scripts: SlideBar, and SlideBarManager. It is not for user interaction, but to display value(s) within a certain range. All the biometrics we will be showing are separated into three sections: healthy, warning, and danger. The job of the slide bars is to display these values while also highlighting which "zone" they belong to. For example, we know that BMI's warning zone is 25-30. If we are given a BMI value of 27, then we need to convey not only the value itself, but also that it belongs to the warning zone and the avatar should start taking precautions.
SlideBar is the main script that shows the data. The abstract SetProgress() will adjust the value in the slide bar. The progress is 0-100 so you need to preprocess the data.
SlideBarManager is the controller of the slide bar. It contains one or more SlideBarPointer(s) and can handle a group of data, like the sbp/dbp components of blood pressure.
Right now there are two slide bar implementations:
- Circular Slide Bar: The bounds are indicated by a line on the circle; the color of the progress bar will change based on the original color and the color of the bounds.
- Mesh Circular Slide Bar: This is an implementation of the circular slide bar in 3D space. It will dynamically create a mesh during
SetProgress(). This is used in Prius visualization.
-
ChangeableColor: Toggles between two colors.
-
Clock: Represents time. Used in "Sleep" section of the lifestyle.
-
FloatingWindow and FoldWindow: Used to provide dynamic effects for the 2D canvases.
-
HeartIndicator: The hearts floating above the avatars in the Activity visualization. Indicates overall health of the avatars.