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

The class is a subclass of the VAB/SPH editor part icon class. This class handles the display of parts into the UI of the game and all the related interactions with such parts, like filtering, enable, disable, tooltip display, etc. More...

Inheritance diagram for Expansions.Missions.Editor.MEPartSelectorEntry:
KSP.UI.Screens.EditorPartIcon

Public Member Functions

void Create (MEPartSelectorBrowser selector, AvailablePart part, float iconSize, float iconOverScale, float iconOverSpin, bool selected)
 Creates a new MEPartSelector entry More...
 
void UpdateSelection (bool selected)
 Updates the selection status of this entry More...
 
- Public Member Functions inherited from KSP.UI.Screens.EditorPartIcon
void Create (EditorPartList partList, AvailablePart part, float iconSize, float iconOverScale, float iconOverSpin)
 Creates a part icon with the specified parameters More...
 
void Create (EditorPartList partList, AvailablePart part, float iconSize, float iconOverScale, float iconOverSpin, Callback< EditorPartIcon > placePartCallback, bool btnPlacePartActive)
 Creates a part icon with the specified parameters More...
 
void Create (EditorPartList partList, AvailablePart part, StoredPart sPart, float iconSize, float iconOverScale, float iconOverSpin, Callback< EditorPartIcon > placePartCallback, bool btnPlacePartActive, bool skipVariants, PartVariant variant, bool useImageThumbnail, bool inInventory)
 Creates a part icon with the specified parameters More...
 
void DisableAddButton ()
 
void DisableDeleteButton ()
 
void EnableAddButton ()
 
void EnableDeleteButton ()
 
PartVariant GetCurrentVariant ()
 Return the current variant that is applied to the availablePart. More...
 
void Highlight ()
 
void MouseInput_PointerEnter (PointerEventData data)
 
void MouseInput_PointerExit (PointerEventData data)
 
void MouseInput_SpawnPart ()
 
void SetEmptySlot ()
 Sets this as an empty slot when there is no part icon to show. More...
 
void SetGrey (string why)
 
void ToggleVariant ()
 Will toggle More...
 
void Unhighlight ()
 
void UnsetGrey ()
 
bool VariantsAvailable ()
 Will return true if the availablePart has Variants More...
 

Public Attributes

bool isSelected
 
- Public Attributes inherited from KSP.UI.Screens.EditorPartIcon
Button btnAdd
 
Button btnPlacePart
 
Button btnRemove
 
Button btnSpawnPart
 
Button btnSwapTexture
 
Color experimentalPartColor = new Color32(128, 128, 255, 255)
 
FlagDecalBackground flagDecalBackground
 The flag Part module reference, assigned when this is created and the part has the module. More...
 
Image highlightImage
 
float iconOverScale
 
float iconOverSpin
 
float iconSize
 
bool inInventory
 This is true if this icon is inside a ModuleInventoryPart grid. More...
 
RawImage inventoryItemThumbnail
 
bool isEmptySlot = false
 Indicates if this PartIcon is an Empty Slot in the Inventory Grid in the PAW. Is not relevant if this instance is not part of an Inventory Grid in a PAW UI. More...
 
bool isFlag
 True if this EditorPartIcon is a flag part. More...
 
bool isPart = true
 
Material[] materials
 
Color missionRequiredPartColor = new Color32(128, 128, 255, 255)
 
PartIcon partIcon
 Reference to the Part Icon object - which contains a reference to the Icon GameObject and cached Renderers. More...
 
Callback< EditorPartIconPlacePartCallback
 
TMPro.TextMeshProUGUI stackAmountText
 
Slider stackSlider
 The slider that shows how many items in a stack are filled More...
 
PartUpgradeHandler.Upgrade upgrade = null
 
int variantIndex
 

Protected Member Functions

void OnPartSelectorClick ()
 
- Protected Member Functions inherited from KSP.UI.Screens.EditorPartIcon
void Start ()
 

Protected Attributes

AvailablePart part
 
MEPartSelectorBrowser partSelector
 
Color selectionColor
 

Additional Inherited Members

- Static Public Member Functions inherited from KSP.UI.Screens.EditorPartIcon
static void CleanUpMaterials (GameObject gameObject)
 
static Material[] CreateMaterialArray (GameObject gameObject)
 
static Material[] CreateMaterialArray (GameObject gameObject, bool includeInactiveRenderers)
 
static void SetPartColor (GameObject partIcon, Color color, AvailablePart part=null)
 Set material colors on object. Finds all materials on the object and sets it to the color passed in. Or will reset back to default colors from the passed in part if color is set to 1,1,1,1. More...
 
static void SetPartColor (GameObject partIcon, Color color, bool isFlag, AvailablePart part=null)
 Set material colors on object. Finds all materials on the object and sets it to the color passed in. Or will reset back to default colors from the passed in part if color is set to 1,1,1,1. More...
 
static void SetPartColor (GameObject partIcon, Color color, bool processUnlit, bool isFlag, AvailablePart part=null)
 Set material colors on object. Finds all materials on the object and sets it to the color passed in. Or will reset back to default colors from the passed in part if color is set to 1,1,1,1. More...
 
- Properties inherited from KSP.UI.Screens.EditorPartIcon
AvailablePart AvailPart [get]
 Reference to the AvailablePart prefab More...
 
bool Focused [get]
 
string greyoutToolTipMessage [get, set]
 
bool HasIconOrThumbnail [get]
 Does the icon or thumbnail exist? More...
 
bool IsCargoPart [get]
 True if Part implements ModuleCargoPart More...
 
bool IsDeployablePart [get]
 
bool isGrey [get, set]
 
bool MouseOver [get]
 
Transform PartIcon [get]
 The Part Icon transform More...
 
AvailablePart partInfo [get]
 
bool StillFocused [get]
 

Detailed Description

The class is a subclass of the VAB/SPH editor part icon class. This class handles the display of parts into the UI of the game and all the related interactions with such parts, like filtering, enable, disable, tooltip display, etc.

Member Function Documentation

void Expansions.Missions.Editor.MEPartSelectorEntry.Create ( MEPartSelectorBrowser  selector,
AvailablePart  part,
float  iconSize,
float  iconOverScale,
float  iconOverSpin,
bool  selected 
)
inline

Creates a new MEPartSelector entry

Parameters
selectorReference to the parent window
partPart used in this entry
iconSizeSize of the displayed part
iconOverScaleScale of the displayed part
iconOverSpinSpin speed of the displayed part
void Expansions.Missions.Editor.MEPartSelectorEntry.OnPartSelectorClick ( )
inlineprotected
void Expansions.Missions.Editor.MEPartSelectorEntry.UpdateSelection ( bool  selected)
inline

Updates the selection status of this entry

Parameters
selectionColor
selected

Member Data Documentation

bool Expansions.Missions.Editor.MEPartSelectorEntry.isSelected
AvailablePart Expansions.Missions.Editor.MEPartSelectorEntry.part
protected
MEPartSelectorBrowser Expansions.Missions.Editor.MEPartSelectorEntry.partSelector
protected
Color Expansions.Missions.Editor.MEPartSelectorEntry.selectionColor
protected

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