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

Public Member Functions

bool CanStackInSlot (AvailablePart part, string partVariantName)
 Checks if the held part can stack into the slot. Checks name of parts matches, checks any part variant selected matches. Checks there is room still for stacking. More...
 
void ClearEmptiedSlot (int prevStackAmount=1)
 Sets a this slot empty and clears stack helper variables More...
 
void OnPointerClick (PointerEventData eventData)
 
void OnPointerEnter (PointerEventData eventData)
 
void OnPointerExit (PointerEventData eventData)
 
void RemovePartFromStack (int slot, string variantName="")
 Sets the number of stacked parts in slot More...
 
void ReturnHeldPartToThisSlot ()
 Return part to this slot by clicking on it More...
 
void SetStackedPartsInSlot (int slot, int howMany, string variantName="")
 Sets the number of stacked parts in slot More...
 
void Setup (UIPartActionInventory inventoryRef, int index)
 Set up the Inventory Slot. More...
 
void StackPartsInSlot (int slot, string variantName="", bool destroyHeldPart=true)
 Stacks a new instance of the part in slot More...
 
void UpdateCurrentSelectedSlot (bool isCurrent)
 Updates the current selected slot normal/greyed sprite. More...
 

Public Attributes

UIPartActionInventory inventoryPartActionUI
 The paw inventory reference this slot belongs to. More...
 
int slotIndex
 The inventory index of this slot. More...
 

Properties

int CurrentStackedAmount [get]
 The amount of parts of the same kind that are currently stacked in a single inventory slot More...
 
bool HaveStackingSpace [get]
 Returns true if there is still space to stack parts in this slot. More...
 
bool IsStackable [get]
 The if the part in this slot can be stacked More...
 
int MaxStackedAmount [get]
 The Capacity of parts of the same kind that can be stacked in a single inventory slot More...
 

Member Function Documentation

bool UIPartActionInventorySlot.CanStackInSlot ( AvailablePart  part,
string  partVariantName 
)
inline

Checks if the held part can stack into the slot. Checks name of parts matches, checks any part variant selected matches. Checks there is room still for stacking.

Parameters
partPart to test for can stack
partVariantNamename of the variant
Returns
True if there is space in this slot for this part
void UIPartActionInventorySlot.ClearEmptiedSlot ( int  prevStackAmount = 1)
inline

Sets a this slot empty and clears stack helper variables

void UIPartActionInventorySlot.OnPointerClick ( PointerEventData  eventData)
inline
void UIPartActionInventorySlot.OnPointerEnter ( PointerEventData  eventData)
inline
void UIPartActionInventorySlot.OnPointerExit ( PointerEventData  eventData)
inline
void UIPartActionInventorySlot.RemovePartFromStack ( int  slot,
string  variantName = "" 
)
inline

Sets the number of stacked parts in slot

void UIPartActionInventorySlot.ReturnHeldPartToThisSlot ( )
inline

Return part to this slot by clicking on it

void UIPartActionInventorySlot.SetStackedPartsInSlot ( int  slot,
int  howMany,
string  variantName = "" 
)
inline

Sets the number of stacked parts in slot

void UIPartActionInventorySlot.Setup ( UIPartActionInventory  inventoryRef,
int  index 
)
inline

Set up the Inventory Slot.

Parameters
inventoryRefPAW inventory reference.
indexSlot's index in the grid and inventory.
void UIPartActionInventorySlot.StackPartsInSlot ( int  slot,
string  variantName = "",
bool  destroyHeldPart = true 
)
inline

Stacks a new instance of the part in slot

void UIPartActionInventorySlot.UpdateCurrentSelectedSlot ( bool  isCurrent)
inline

Updates the current selected slot normal/greyed sprite.

Parameters
isCurrent

Member Data Documentation

UIPartActionInventory UIPartActionInventorySlot.inventoryPartActionUI

The paw inventory reference this slot belongs to.

int UIPartActionInventorySlot.slotIndex

The inventory index of this slot.

Property Documentation

int UIPartActionInventorySlot.CurrentStackedAmount
get

The amount of parts of the same kind that are currently stacked in a single inventory slot

bool UIPartActionInventorySlot.HaveStackingSpace
get

Returns true if there is still space to stack parts in this slot.

bool UIPartActionInventorySlot.IsStackable
get

The if the part in this slot can be stacked

int UIPartActionInventorySlot.MaxStackedAmount
get

The Capacity of parts of the same kind that can be stacked in a single inventory slot


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