-
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 text, and its sub classes should implement SetValue() and SetText().
The slide bar consists of three scripts: SlideBarBackground, SlideBarPointer, and SlideBarManager. It is not for user interaction, but to display value(s) within a certain range. Consider the data we are using: for all the biometrics, there are healthy (min-warning)/moderate (warning-upper)/dangerous (upper-max) zones. 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 moderate 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 moderate zone and the avatar should start taking precautions.
SlideBarBackground is used to indicate the bounds of the slide bar. There are two abstract methods: SetWarningBound() and SetUpperBound() that would allow dynamic adjustment of bounds through Ranges.csv.
SlideBarPointer might not necessarily be a "pointer", but it should indicate the value itself. 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.
Below are a list of slide bar implementations:
-
Circular Slide Bar: This slide bar does not have a background component because the "upper" range is capped at 75% of the circle. The upper bound is indicated by a line on the circle; the color of the progress bar will change based on the original color and the upper color.
- 3D Circular Slide Bar: This is an implementation of the circular slide bar in 3D space. It will dynamically create a mesh during
SetProgress().
- 3D Circular Slide Bar: This is an implementation of the circular slide bar in 3D space. It will dynamically create a mesh during
-
Advance Circular Slide Bar: This slide bar is an extension of the original circular slide bar. It adds a "lower" range.
-
Indicator Slide Bar: This is the slide bar used by ribbon charts. There will be a stripe or an "indicator" to display the value. The position of the indicator is then used to create ribbons.
-
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.