class MAGES::Analytics::Editor::BaseAnalyticsUI¶
Overview¶
The base class that contains and draws the base UI for all analytics types. More…
class BaseAnalyticsUI { public: // methods void Initialize( AnalyticsScriptableObject so, string entryName, string assetName, string savePath, VisualElement parent, VisualElement foldout, AnalyticsTypes.Type type, Type internalType, Type internalTypeUI, bool editMode, ScrollView existingItemsView, List> items, BaseAnalyticsStateMachine stateMachine ); virtual void Save( AnalyticsScriptableObject so, string name, string typeOfError, string info, int penalty ); virtual void Delete(AnalyticsScriptableObject so, string key); virtual void Draw( AnalyticsScriptableObject so, VisualElement foldout, bool isObjective, bool editMode = false, string entryName = "" ); }; // direct descendants class CustomTypeUI; class DidNotPerformRequiredActionUI; class ErrorAngleUI; class ErrorColliderUI; class InteractionRestrictionUI; class PerformedWrongActionUI; class RangeOfMotionLimitUI; class RotationRestrictionUI; class ScoreLimitUI; class TimeLimitUI; class WrongAnswerUI;
Detailed Documentation¶
The base class that contains and draws the base UI for all analytics types.
Methods¶
void Initialize( AnalyticsScriptableObject so, string entryName, string assetName, string savePath, VisualElement parent, VisualElement foldout, AnalyticsTypes.Type type, Type internalType, Type internalTypeUI, bool editMode, ScrollView existingItemsView, List> items, BaseAnalyticsStateMachine stateMachine )
Draws the analytics object pane.
Parameters:
so |
The scriptable object that is associated with this type. |
entryName |
The name of the entry. |
assetName |
The name of the action. |
savePath |
The save path for the scriptable objects. |
parent |
The parent UI element of the foldout list UI element. |
foldout |
The foldout element that the analytics object specific UI elements will be under. |
type |
Specifies the analytics object type (objective or error). |
internalType |
The type of the internal type that holds the data. |
internalTypeUI |
The type of the internal type that holds the UI. |
editMode |
Specifies if the UI is in edit mode. |
existingItemsView |
The dropdown element that holds the list of all the analytics entries of the selected type. |
items |
The items that are currently displayed in the existing item scrollview. |
stateMachine |
Reference to the state machine. |
virtual void Save( AnalyticsScriptableObject so, string name, string typeOfError, string info, int penalty )
Saves the changes made to this analytics entry.
Parameters:
so |
The scriptable object that the data are stored to. |
name |
The name of the error to save. |
typeOfError |
The type of the error to save. |
info |
The info of the error to save. |
penalty |
The penalty of the error to save. |
virtual void Delete(AnalyticsScriptableObject so, string key)
Deletes the specified analytics object from the scriptable object and UI.
Parameters:
so |
The scriptable object that the data are stored to. |
key |
The name of the error to delete. |
virtual void Draw( AnalyticsScriptableObject so, VisualElement foldout, bool isObjective, bool editMode = false, string entryName = "" )
Draws the analytics object specific UI elements.
Parameters:
so |
The scriptable object that the data are stored to. |
foldout |
The parent foldout element that the analytics object specific UI elements will be under. |
isObjective |
Specifies is the analytics object is for the objective UI or not. |
editMode |
Specifies whether or not we are int edit or create mode. |
entryName |
The name of the current entry that gets edited. |