Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | Events | List of all members
BaseAxisField Class Reference
Inheritance diagram for BaseAxisField:
BaseField

Public Member Functions

 BaseAxisField (KSPAxisField fieldAttrib, FieldInfo fieldInfo, object host)
 
bool ContainsNonDefaultAxes ()
 Check if the default group is not the default axis group or the override groups have any axis groups More...
 
override void CopyField (BaseField field)
 Copy user editable settings More...
 
KSPAxisGroup GetAxisGroup (int groupOverride)
 Get the axis group bindings for the specified override group More...
 
void IncrementAxis (float axisRate)
 Increment field value by axisRate * speed More...
 
bool IsInGroup (KSPAxisGroup group, int overrideGroup, bool overrideDefault, bool include)
 Check wether the axis field is bound to the specified group, respecting the vessel's current override group and whether the default group is overriden. More...
 
void OnLoad (ConfigNode node)
 Persistence support More...
 
void OnSave (ConfigNode node)
 Persistence support More...
 
void SetAxis (float axisValue)
 Set field value mapping axisValue from -1..1 to min..max More...
 
void SetIncrementalSpeedMultiplier (float value)
 Called to set a new value for incrementalSpeedMultiplier This then fires OnAxisSpeedChanged More...
 
void UpdateAxis (KSPAxisGroup group, int groupOverride, float axisValue)
 Update field value by axisRate according to its mode More...
 
- Public Member Functions inherited from BaseField
 BaseField (KSPField fieldAttrib, FieldInfo fieldInfo, object host)
 
 BaseField (UI_Control fieldAttrib, FieldInfo fieldInfo, object host)
 
string GetStringValue (object host, bool gui)
 
string GuiString (object host)
 
void Read (string value, object host)
 
void Write (StreamWriter sw, string tabIndent, object host)
 

Static Public Member Functions

static void AddAxis (BaseAxisFieldList axisFieldList, KSPAxisGroup group, int overrideGroup, bool overrideDefault, bool include, BaseAxisField axisField)
 Add the axis field to the list if it is in the specified group if include is true, or not in the specified group if include is false. More...
 
static void AddAxis (BaseAxisFieldList axisFieldList, Expansions.Serenity.ModuleRoboticController controller, Part part, bool include, BaseAxisField axisField)
 Add an Axis to a Axes list More...
 
static bool ContainsNonDefaultAxes (Part part)
 Check if the default group is not the default axis group or the override groups have any axis groups More...
 
static BaseAxisFieldList CreateAxisList (List< Part > parts, KSPAxisGroup group, int overrideGroup, bool overrideDefault, bool include)
 Create list of axis fields bound to the group specified by group and overrideGroup. More...
 
static BaseAxisFieldList CreateAxisList (Part part, KSPAxisGroup group, int overrideGroup, bool overrideDefault, bool include)
 Create list of axis fields bound to the group specified by group and overrideGroup. More...
 
static BaseAxisFieldList CreateAxisList (List< Part > parts, Expansions.Serenity.ModuleRoboticController controller, bool include)
 Create a list of axes that are applicable to this controller More...
 
static BaseAxisFieldList CreateAxisList (Part part, Expansions.Serenity.ModuleRoboticController controller, bool include)
 Create a list of axes that are applicable to this controller More...
 
static List< bool > CreateGroupList (List< Part > parts)
 
static List< bool > CreateGroupList (List< Part > parts, int groupOverride)
 Create an array of flags indicating usage of axis groups More...
 
static string[] GetAxisGroups (int maxlevel)
 Get an array of the axis group names More...
 
static int GetAxisGroupsLength (float facilityLevel, bool isVAB=true)
 Number of actual axis groups available based on facilityLevel More...
 

Public Attributes

bool active
 Set to false to remove visibilty from editor and stop this axis from being modified More...
 
KSPAxisGroup axisGroup
 
KSPAxisGroup axisIncremental
 
KSPAxisGroup axisInverted
 
KSPAxisGroup defaultAxisGroup
 
bool ignoreClampWhenIncremental
 When true the incremental adjustments will ignore the min/max clamps and leave it to the instance object to handle values outside the min/max More...
 
bool ignoreIncrementByZero
 When true if the increment value is zero the field will not be sent a setValue More...
 
float incrementalSpeed
 The speed at which the field will change for incremental bindings. More...
 
float incrementalSpeedMultiplier
 Incremental speed multiplier. More...
 
float maxValue
 The maximum value for the field. More...
 
float minValue
 The minimum value for the field. More...
 
KSPAxisGroup[] overrideGroups
 
KSPAxisGroup[] overrideIncremental
 
KSPAxisGroup[] overrideInverted
 
- Public Attributes inherited from BaseField
BasePAWGroup group
 The group that this item will appear in in the PartActionWindow More...
 

Static Public Attributes

static KSPAxisGroup MaxAxisGroup = KSPAxisGroup.Custom04
 Highest axis group bit expected More...
 

Properties

static int AxisGroupsLength [get]
 Number of actual axis groups available More...
 
PartModule module [get]
 
- Properties inherited from BaseField
bool advancedTweakable [get, set]
 
string category [get, set]
 string category id More...
 
bool guiActive [get, set]
 Is this field active on gui More...
 
bool guiActiveEditor [get, set]
 Is this field active on editor gui More...
 
bool guiActiveUnfocused [get, set]
 Is this field active while focused on another vessel? More...
 
string guiFormat [get, set]
 The gui format string for this field (D4, F2, N0, etc). Blank if none More...
 
bool guiInteractable [get, set]
 Is this field interactable on gui More...
 
bool guiRemovedIfPinned [get, set]
 Range to check if the gui should be active or not. More...
 
float guiUnfocusedRange [get, set]
 Range to check if the gui should be active or not. More...
 
string guiUnits [get, set]
 The field's gui units (blank if none) More...
 
bool isPersistant [get, set]
 Is this field persistant? More...
 
UI_Control uiControlEditor [get, set]
 ui control used for editor More...
 
UI_Control uiControlFlight [get, set]
 ui control used for flight More...
 
bool uiControlOnly [get]
 is this a UIControl masqerading as a KSPField? More...
 
bool WasActiveBeforePartWasAdjusted [get, set]
 

Events

Callback OnAxisSpeedChanged
 Called after the incrementalSpeedMultiplier or incrementalSpeed value are modified More...
 

Additional Inherited Members

- Static Protected Attributes inherited from BaseField
static string cacheAutoLOC_8004438
 
static string cacheAutoLOC_8004439
 
static Dictionary< int,
UI_Control[]> 
fieldInfoToUIControlDictionary = new Dictionary<int, UI_Control[]>()
 
static KSPUtil.ObjectActivator
< UI_Label
objectActivatorUILabelLambdaExpression = null
 
static Dictionary< System.Type,
FieldInfo[]> 
typeToFieldInfoDictionary = new Dictionary<System.Type, FieldInfo[]>()
 

Constructor & Destructor Documentation

BaseAxisField.BaseAxisField ( KSPAxisField  fieldAttrib,
FieldInfo  fieldInfo,
object  host 
)
inline

Member Function Documentation

static void BaseAxisField.AddAxis ( BaseAxisFieldList  axisFieldList,
KSPAxisGroup  group,
int  overrideGroup,
bool  overrideDefault,
bool  include,
BaseAxisField  axisField 
)
inlinestatic

Add the axis field to the list if it is in the specified group if include is true, or not in the specified group if include is false.

static void BaseAxisField.AddAxis ( BaseAxisFieldList  axisFieldList,
Expansions.Serenity.ModuleRoboticController  controller,
Part  part,
bool  include,
BaseAxisField  axisField 
)
inlinestatic

Add an Axis to a Axes list

Parameters
axisFieldListlist to add to
controllerController to build against
includeTrue to include axis already in the controller, false to include ones not
axisFieldAxisField to add
Returns
List of Axes
bool BaseAxisField.ContainsNonDefaultAxes ( )
inline

Check if the default group is not the default axis group or the override groups have any axis groups

static bool BaseAxisField.ContainsNonDefaultAxes ( Part  part)
inlinestatic

Check if the default group is not the default axis group or the override groups have any axis groups

override void BaseAxisField.CopyField ( BaseField  field)
inlinevirtual

Copy user editable settings

Reimplemented from BaseField.

static BaseAxisFieldList BaseAxisField.CreateAxisList ( List< Part parts,
KSPAxisGroup  group,
int  overrideGroup,
bool  overrideDefault,
bool  include 
)
inlinestatic

Create list of axis fields bound to the group specified by group and overrideGroup.

Used only by the editor as flight-mode support needs to cache the lists.

static BaseAxisFieldList BaseAxisField.CreateAxisList ( Part  part,
KSPAxisGroup  group,
int  overrideGroup,
bool  overrideDefault,
bool  include 
)
inlinestatic

Create list of axis fields bound to the group specified by group and overrideGroup.

Used only by the editor as flight-mode support needs to cache the lists.

static BaseAxisFieldList BaseAxisField.CreateAxisList ( List< Part parts,
Expansions.Serenity.ModuleRoboticController  controller,
bool  include 
)
inlinestatic

Create a list of axes that are applicable to this controller

Parameters
partsParts to build the list from
controllerController to build against
includeTrue to include axis already in the controller, false to include ones not
Returns
List of Axes
static BaseAxisFieldList BaseAxisField.CreateAxisList ( Part  part,
Expansions.Serenity.ModuleRoboticController  controller,
bool  include 
)
inlinestatic

Create a list of axes that are applicable to this controller

Parameters
partPart to build the list from
controllerController to build against
includeTrue to include axis already in the controller, false to include ones not
Returns
List of Axes
static List<bool> BaseAxisField.CreateGroupList ( List< Part parts)
inlinestatic
static List<bool> BaseAxisField.CreateGroupList ( List< Part parts,
int  groupOverride 
)
inlinestatic

Create an array of flags indicating usage of axis groups

KSPAxisGroup BaseAxisField.GetAxisGroup ( int  groupOverride)
inline

Get the axis group bindings for the specified override group

static string [] BaseAxisField.GetAxisGroups ( int  maxlevel)
inlinestatic

Get an array of the axis group names

static int BaseAxisField.GetAxisGroupsLength ( float  facilityLevel,
bool  isVAB = true 
)
inlinestatic

Number of actual axis groups available based on facilityLevel

void BaseAxisField.IncrementAxis ( float  axisRate)
inline

Increment field value by axisRate * speed

The field value is clamped to the range min..max

bool BaseAxisField.IsInGroup ( KSPAxisGroup  group,
int  overrideGroup,
bool  overrideDefault,
bool  include 
)
inline

Check wether the axis field is bound to the specified group, respecting the vessel's current override group and whether the default group is overriden.

The include paramenter is false only in the editor for building part action lists

void BaseAxisField.OnLoad ( ConfigNode  node)
inline

Persistence support

void BaseAxisField.OnSave ( ConfigNode  node)
inline

Persistence support

void BaseAxisField.SetAxis ( float  axisValue)
inline

Set field value mapping axisValue from -1..1 to min..max

void BaseAxisField.SetIncrementalSpeedMultiplier ( float  value)
inline

Called to set a new value for incrementalSpeedMultiplier This then fires OnAxisSpeedChanged

void BaseAxisField.UpdateAxis ( KSPAxisGroup  group,
int  groupOverride,
float  axisValue 
)
inline

Update field value by axisRate according to its mode

Member Data Documentation

bool BaseAxisField.active

Set to false to remove visibilty from editor and stop this axis from being modified

KSPAxisGroup BaseAxisField.axisGroup
KSPAxisGroup BaseAxisField.axisIncremental
KSPAxisGroup BaseAxisField.axisInverted
KSPAxisGroup BaseAxisField.defaultAxisGroup
bool BaseAxisField.ignoreClampWhenIncremental

When true the incremental adjustments will ignore the min/max clamps and leave it to the instance object to handle values outside the min/max

bool BaseAxisField.ignoreIncrementByZero

When true if the increment value is zero the field will not be sent a setValue

float BaseAxisField.incrementalSpeed

The speed at which the field will change for incremental bindings.

This is in Units/Second

float BaseAxisField.incrementalSpeedMultiplier

Incremental speed multiplier.

KSPAxisGroup BaseAxisField.MaxAxisGroup = KSPAxisGroup.Custom04
static

Highest axis group bit expected

float BaseAxisField.maxValue

The maximum value for the field.

float BaseAxisField.minValue

The minimum value for the field.

KSPAxisGroup [] BaseAxisField.overrideGroups
KSPAxisGroup [] BaseAxisField.overrideIncremental
KSPAxisGroup [] BaseAxisField.overrideInverted

Property Documentation

int BaseAxisField.AxisGroupsLength
staticget

Number of actual axis groups available

PartModule BaseAxisField.module
get

Event Documentation

Callback BaseAxisField.OnAxisSpeedChanged

Called after the incrementalSpeedMultiplier or incrementalSpeed value are modified


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