Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Public Attributes | Properties | List of all members
Expansions.Serenity.CurvePanel Class Reference

A panel that has a line drawn in it from an Float Curve More...

Inheritance diagram for Expansions.Serenity.CurvePanel:

Classes

class  CurvePanelPointChangeInfo
 Class to store data about point changes for callbacks More...
 

Public Member Functions

void ClearSelectedPoints ()
 Clear all point selections in this curve More...
 
void DeletePoint (CurvePanelPoint p)
 Delete this point More...
 
void DeletePoint (int pointIndex)
 Delete this point More...
 
void DeleteSelectedPoints ()
 Delete all the selected points More...
 
void DrawAll (bool newline=true)
 Draw all the panel bits More...
 
void DrawLine (bool newline=true)
 Draw the line More...
 
void DrawPoints (bool newline=true)
 Build the curvePoints from the floatcurve, create the GOs and set their visbility More...
 
void HideLimits ()
 Hide the min/max limit overlays More...
 
void HideMaxLimit ()
 Hide the max limit overlay More...
 
void HideMinLimit ()
 Hide the min limit overlay More...
 
void HidePoints ()
 Hide the points that define the line More...
 
void InsertPoint (int linePointIndex)
 Insert a point in the floatcurve at the screen line point More...
 
void InsertPoint (float timeValue)
 Insert a point in the floatcurve at the timevalue More...
 
void OnPointerClick (PointerEventData eventData)
 
void RemoveLimitClamping ()
 
void SelectAllPoints ()
 Select all the points in this curve More...
 
void SelectPoint (CurvePanelPoint p, bool hideDelete=false)
 Select the passed CurvePanelPoint More...
 
void SelectPoint (int pointIndex, bool hideDelete=false)
 Select the passed CurvePanelPoint More...
 
void SelectPoint (float time, bool hideDelete=false)
 Select any point at the passed in time More...
 
void SetEditable (bool editable)
 Change state of panel to be editable or not More...
 
void SetLimitClamping ()
 
void SetLimits (Vector2 axisMinMax)
 
void SetLimits (Vector2 axisMinMan, Vector2 limitsMinMax)
 
void Setup (FloatCurve curve, string objectName)
 
void Setup (FloatCurve curve, string objectName, float axisMin, float axisMax)
 
void ShowLimits ()
 Show the min/max limit overlays More...
 
void ShowMaxLimit ()
 Show the max limit overlay More...
 
void ShowMinLimit ()
 Show the min limit overlay More...
 
void ShowPoints ()
 Show the points that define the line More...
 

Public Attributes

float clampSpace = 0.01f
 
bool draggingPoint = false
 
int insertionDetectTolerance = 5
 Distance from the line to detect double-click More...
 
int intersegmentCount = 20
 How many interpolated points to help smooth the line More...
 
Color lineColor = Color.blue
 Line Color More...
 
Callback OnPanelLeftClick
 Callback whenever the panel is clicked More...
 
Callback
< CurvePanelPointChangeInfo
OnPointAdded
 Callback whenever a Point is added - passes an object with point details More...
 
Callback< int > OnPointDeleted
 Callback whenever a Point is being deleted - passes the index of teh point More...
 
Callback< List< CurvePanelPoint > > OnPointDragging
 Callback whenever a Point is being dragged, passes the current selected points list More...
 
Callback
< CurvePanelPointChangeInfo
OnPointMoved
 Callback whenever a Point is being moved - passes an object with point details More...
 
Callback< CurvePanel, List
< CurvePanelPoint > > 
OnPointSelectionChanged
 Callback whenever selected points is changed, passes the current selected points list More...
 

Properties

bool ClampValuesWithLimits [get, set]
 Should we clamp the y value inside the limits as well as the axis minmax More...
 
FloatCurve curve [get, set]
 The floatcurve that is being drawn and managed More...
 
bool Editable [get, set]
 Is the panel in edit or readonly mode More...
 
bool MaxLimitVisible [get, set]
 Should the limit be shown if its inside the axis limits More...
 
bool MinLimitVisible [get, set]
 Should the limit be shown if its inside the axis limits More...
 
bool PointsVisible [get, set]
 Is the panel in edit or readonly mode More...
 
List< int > SelectedPointIndexes [get, set]
 The indexes of the selected points More...
 
List< CurvePanelPointSelectedPoints [get, set]
 The points selected in the panel. More...
 
int SelectedPointsCount [get]
 
float YAxisMax [get, set]
 Y-Axis Max value More...
 
float YAxisMaxLimit [get, set]
 Y-Axis Max limit value More...
 
float YAxisMin [get, set]
 Y-Axis Min value More...
 
float YAxisMinLimit [get, set]
 Y-Axis Min limit value More...
 

Detailed Description

A panel that has a line drawn in it from an Float Curve

Member Function Documentation

void Expansions.Serenity.CurvePanel.ClearSelectedPoints ( )
inline

Clear all point selections in this curve

void Expansions.Serenity.CurvePanel.DeletePoint ( CurvePanelPoint  p)
inline

Delete this point

Parameters
pCurvePanel point to delete
void Expansions.Serenity.CurvePanel.DeletePoint ( int  pointIndex)
inline

Delete this point

Parameters
pointIndexIndex of CurvePanel point to delete
void Expansions.Serenity.CurvePanel.DeleteSelectedPoints ( )
inline

Delete all the selected points

void Expansions.Serenity.CurvePanel.DrawAll ( bool  newline = true)
inline

Draw all the panel bits

Parameters
newlineRecreate the line if true
void Expansions.Serenity.CurvePanel.DrawLine ( bool  newline = true)
inline

Draw the line

Parameters
newlineAre we recreting it - false if just editing point positions
void Expansions.Serenity.CurvePanel.DrawPoints ( bool  newline = true)
inline

Build the curvePoints from the floatcurve, create the GOs and set their visbility

void Expansions.Serenity.CurvePanel.HideLimits ( )
inline

Hide the min/max limit overlays

void Expansions.Serenity.CurvePanel.HideMaxLimit ( )
inline

Hide the max limit overlay

void Expansions.Serenity.CurvePanel.HideMinLimit ( )
inline

Hide the min limit overlay

void Expansions.Serenity.CurvePanel.HidePoints ( )
inline

Hide the points that define the line

void Expansions.Serenity.CurvePanel.InsertPoint ( int  linePointIndex)
inline

Insert a point in the floatcurve at the screen line point

Parameters
linePointIndexindex of the nearest line point
void Expansions.Serenity.CurvePanel.InsertPoint ( float  timeValue)
inline

Insert a point in the floatcurve at the timevalue

Parameters
timeValuetimeValue along the curve
void Expansions.Serenity.CurvePanel.OnPointerClick ( PointerEventData  eventData)
inline
void Expansions.Serenity.CurvePanel.RemoveLimitClamping ( )
inline
void Expansions.Serenity.CurvePanel.SelectAllPoints ( )
inline

Select all the points in this curve

void Expansions.Serenity.CurvePanel.SelectPoint ( CurvePanelPoint  p,
bool  hideDelete = false 
)
inline

Select the passed CurvePanelPoint

Parameters
pthe point to select
hideDeleteShould we show the point delete action
void Expansions.Serenity.CurvePanel.SelectPoint ( int  pointIndex,
bool  hideDelete = false 
)
inline

Select the passed CurvePanelPoint

Parameters
pointIndexIndex of the curve key
hideDeleteShould we show the point delete action
void Expansions.Serenity.CurvePanel.SelectPoint ( float  time,
bool  hideDelete = false 
)
inline

Select any point at the passed in time

Parameters
timeTime of the curve key
hideDeleteShould we show the point delete action
void Expansions.Serenity.CurvePanel.SetEditable ( bool  editable)
inline

Change state of panel to be editable or not

Parameters
editableDesired state
void Expansions.Serenity.CurvePanel.SetLimitClamping ( )
inline
void Expansions.Serenity.CurvePanel.SetLimits ( Vector2  axisMinMax)
inline
void Expansions.Serenity.CurvePanel.SetLimits ( Vector2  axisMinMan,
Vector2  limitsMinMax 
)
inline
void Expansions.Serenity.CurvePanel.Setup ( FloatCurve  curve,
string  objectName 
)
inline
void Expansions.Serenity.CurvePanel.Setup ( FloatCurve  curve,
string  objectName,
float  axisMin,
float  axisMax 
)
inline
void Expansions.Serenity.CurvePanel.ShowLimits ( )
inline

Show the min/max limit overlays

void Expansions.Serenity.CurvePanel.ShowMaxLimit ( )
inline

Show the max limit overlay

void Expansions.Serenity.CurvePanel.ShowMinLimit ( )
inline

Show the min limit overlay

void Expansions.Serenity.CurvePanel.ShowPoints ( )
inline

Show the points that define the line

Member Data Documentation

float Expansions.Serenity.CurvePanel.clampSpace = 0.01f
bool Expansions.Serenity.CurvePanel.draggingPoint = false
int Expansions.Serenity.CurvePanel.insertionDetectTolerance = 5

Distance from the line to detect double-click

int Expansions.Serenity.CurvePanel.intersegmentCount = 20

How many interpolated points to help smooth the line

Color Expansions.Serenity.CurvePanel.lineColor = Color.blue

Line Color

Callback Expansions.Serenity.CurvePanel.OnPanelLeftClick

Callback whenever the panel is clicked

Callback<CurvePanelPointChangeInfo> Expansions.Serenity.CurvePanel.OnPointAdded

Callback whenever a Point is added - passes an object with point details

Callback<int> Expansions.Serenity.CurvePanel.OnPointDeleted

Callback whenever a Point is being deleted - passes the index of teh point

Callback<List<CurvePanelPoint> > Expansions.Serenity.CurvePanel.OnPointDragging

Callback whenever a Point is being dragged, passes the current selected points list

Callback<CurvePanelPointChangeInfo> Expansions.Serenity.CurvePanel.OnPointMoved

Callback whenever a Point is being moved - passes an object with point details

Callback<CurvePanel, List<CurvePanelPoint> > Expansions.Serenity.CurvePanel.OnPointSelectionChanged

Callback whenever selected points is changed, passes the current selected points list

Property Documentation

bool Expansions.Serenity.CurvePanel.ClampValuesWithLimits
getset

Should we clamp the y value inside the limits as well as the axis minmax

FloatCurve Expansions.Serenity.CurvePanel.curve
getset

The floatcurve that is being drawn and managed

bool Expansions.Serenity.CurvePanel.Editable
getset

Is the panel in edit or readonly mode

bool Expansions.Serenity.CurvePanel.MaxLimitVisible
getset

Should the limit be shown if its inside the axis limits

bool Expansions.Serenity.CurvePanel.MinLimitVisible
getset

Should the limit be shown if its inside the axis limits

bool Expansions.Serenity.CurvePanel.PointsVisible
getset

Is the panel in edit or readonly mode

List<int> Expansions.Serenity.CurvePanel.SelectedPointIndexes
getset

The indexes of the selected points

List<CurvePanelPoint> Expansions.Serenity.CurvePanel.SelectedPoints
getset

The points selected in the panel.

int Expansions.Serenity.CurvePanel.SelectedPointsCount
get
float Expansions.Serenity.CurvePanel.YAxisMax
getset

Y-Axis Max value

float Expansions.Serenity.CurvePanel.YAxisMaxLimit
getset

Y-Axis Max limit value

For visible limit displays, and clamping if limit clamping enabled

float Expansions.Serenity.CurvePanel.YAxisMin
getset

Y-Axis Min value

float Expansions.Serenity.CurvePanel.YAxisMinLimit
getset

Y-Axis Min limit value

For visible limit displays, and clamping if limit clamping enabled


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