MMFeedbacks  v1.6
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Feedbacks.MMFeedbacksEditor Class Reference

A custom editor displaying a foldable list of MMFeedbacks, a dropdown to add more, as well as test buttons to test your feedbacks at runtime More...

Inheritance diagram for MoreMountains.Feedbacks.MMFeedbacksEditor:

Classes

class  FeedbackTypePair
 A data structure to store types and names More...
 

Public Member Functions

override void OnInspectorGUI ()
 Draws the inspector, complete with helpbox, init mode selection, list of feedbacks, feedback selection and test buttons More...
 
override bool RequiresConstantRepaint ()
 We need to repaint constantly if dragging a feedback around More...
 

Protected Member Functions

virtual void RepairRoutine ()
 Calls the repair routine if needed More...
 
virtual MMFeedback AddFeedback (System.Type type)
 Add a feedback to the list More...
 
virtual void AddEditor (MMFeedback feedback)
 Create the editor for a feedback More...
 
virtual void RemoveEditor (MMFeedback feedback)
 Destroy the editor for a feedback More...
 
virtual void InitializeFeedback (int id)
 Play the selected feedback More...
 
virtual void PlayFeedback (int id)
 Play the selected feedback More...
 
virtual void StopFeedback (int id)
 Play the selected feedback More...
 
virtual void ResetFeedback (int id)
 Resets the selected feedback More...
 
virtual void RemoveFeedback (int id)
 Remove the selected feedback More...
 
virtual void CopyFeedback (int id)
 Copy the selected feedback More...
 
virtual void CopyAll ()
 Asks for a full copy of the source More...
 
virtual void PasteFeedback (int id)
 Paste the previously copied feedback values into the selected feedback More...
 
virtual void PasteAsNew ()
 Creates a new feedback and applies the previoulsy copied feedback values More...
 
virtual void PasteAllAsNew ()
 Asks for a paste of all feedbacks in the source More...
 

Protected Attributes

SerializedProperty _mmfeedbacks
 
SerializedProperty _mmfeedbacksInitializationMode
 
SerializedProperty _mmfeedbacksSafeMode
 
SerializedProperty _mmfeedbacksAutoPlayOnStart
 
Dictionary< MMFeedback, Editor > _editors
 
List< FeedbackTypePair_typesAndNames = new List<FeedbackTypePair>()
 
string[] _typeDisplays
 
int _draggedStartID = -1
 
int _draggedEndID = -1
 

Detailed Description

A custom editor displaying a foldable list of MMFeedbacks, a dropdown to add more, as well as test buttons to test your feedbacks at runtime

Member Function Documentation

◆ AddEditor()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.AddEditor ( MMFeedback  feedback)
protectedvirtual

Create the editor for a feedback

◆ AddFeedback()

virtual MMFeedback MoreMountains.Feedbacks.MMFeedbacksEditor.AddFeedback ( System.Type  type)
protectedvirtual

Add a feedback to the list

◆ CopyAll()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.CopyAll ( )
protectedvirtual

Asks for a full copy of the source

◆ CopyFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.CopyFeedback ( int  id)
protectedvirtual

Copy the selected feedback

◆ InitializeFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.InitializeFeedback ( int  id)
protectedvirtual

Play the selected feedback

◆ OnInspectorGUI()

override void MoreMountains.Feedbacks.MMFeedbacksEditor.OnInspectorGUI ( )

Draws the inspector, complete with helpbox, init mode selection, list of feedbacks, feedback selection and test buttons

◆ PasteAllAsNew()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PasteAllAsNew ( )
protectedvirtual

Asks for a paste of all feedbacks in the source

◆ PasteAsNew()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PasteAsNew ( )
protectedvirtual

Creates a new feedback and applies the previoulsy copied feedback values

◆ PasteFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PasteFeedback ( int  id)
protectedvirtual

Paste the previously copied feedback values into the selected feedback

◆ PlayFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PlayFeedback ( int  id)
protectedvirtual

Play the selected feedback

◆ RemoveEditor()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.RemoveEditor ( MMFeedback  feedback)
protectedvirtual

Destroy the editor for a feedback

◆ RemoveFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.RemoveFeedback ( int  id)
protectedvirtual

Remove the selected feedback

◆ RepairRoutine()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.RepairRoutine ( )
protectedvirtual

Calls the repair routine if needed

◆ RequiresConstantRepaint()

override bool MoreMountains.Feedbacks.MMFeedbacksEditor.RequiresConstantRepaint ( )

We need to repaint constantly if dragging a feedback around

◆ ResetFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.ResetFeedback ( int  id)
protectedvirtual

Resets the selected feedback

Parameters
id

◆ StopFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.StopFeedback ( int  id)
protectedvirtual

Play the selected feedback

Member Data Documentation

◆ _draggedEndID

int MoreMountains.Feedbacks.MMFeedbacksEditor._draggedEndID = -1
protected

◆ _draggedStartID

int MoreMountains.Feedbacks.MMFeedbacksEditor._draggedStartID = -1
protected

◆ _editors

Dictionary<MMFeedback, Editor> MoreMountains.Feedbacks.MMFeedbacksEditor._editors
protected

◆ _mmfeedbacks

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacks
protected

◆ _mmfeedbacksAutoPlayOnStart

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksAutoPlayOnStart
protected

◆ _mmfeedbacksInitializationMode

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksInitializationMode
protected

◆ _mmfeedbacksSafeMode

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksSafeMode
protected

◆ _typeDisplays

string [] MoreMountains.Feedbacks.MMFeedbacksEditor._typeDisplays
protected

◆ _typesAndNames

List<FeedbackTypePair> MoreMountains.Feedbacks.MMFeedbacksEditor._typesAndNames = new List<FeedbackTypePair>()
protected

The documentation for this class was generated from the following file: