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.MEPartCategorizer Class Reference
Inheritance diagram for Expansions.Missions.Editor.MEPartCategorizer:
KSP.UI.Screens.BasePartCategorizer

Public Member Functions

void OnPointerDown (PointerEventData data)
 
void OnPointerUp (PointerEventData data)
 
void PartSelected (AvailablePart part, bool status)
 Triggered when a part selection changes, and evalutes the current category part list to see if the category indicator should be on or off More...
 
void Reset ()
 Reset the categories to the new values of the MEPartSelectorBrowser More...
 
void Setup (MEPartSelectorBrowser partSelector)
 Setup the categories button and filters More...
 

Public Attributes

MEPartCategorizerButton buttonPrefab
 
float scrollStep = 0.1f
 
- Public Attributes inherited from KSP.UI.Screens.BasePartCategorizer
Color colorFilterFunction = new Color(0.604f, 0.784f, 0.878f, 1)
 
Color colorIcons = new Color(1, 1, 1, 0.7f)
 
IconLoader iconLoader
 
UIList scrollListSub
 
TMPro.TMP_InputField searchField
 
float searchKeystrokeDelay = 0.25f
 

Protected Member Functions

MEPartCategorizerButton InstantiatePartCategorizerButton (string categoryName, string tooltip, Icon icon, Color colorButton, Color colorIcon, EditorPartListFilter< AvailablePart > filter)
 Initialize a part categorizer button and creates a cache of parts used in that category More...
 
override void SearchFilterResult (EditorPartListFilter< AvailablePart > filter)
 
List< AvailablePartSelectedPartsOfCategory (List< AvailablePart > categoryParts, List< string > selectedParts)
 Gets the list of already selected parts form this category More...
 
- Protected Member Functions inherited from KSP.UI.Screens.BasePartCategorizer
bool PartMatchesSearch (AvailablePart part, string[] terms)
 
virtual void SearchField_OnClick (PointerEventData eventData)
 
virtual void SearchField_OnEndEdit (string s)
 
virtual void SearchField_OnValueChange (string s)
 
virtual IEnumerator SearchRoutine ()
 
virtual void SearchStart ()
 
virtual void SearchStop ()
 
MatchType TagMatchType (ref string tag)
 
bool TermMatchesTag (string term, string tag)
 

Protected Attributes

Color selectionColor
 
- Protected Attributes inherited from KSP.UI.Screens.BasePartCategorizer
EditorPartListFilter
< AvailablePart
filterAero = new EditorPartListFilter<AvailablePart>("Function_Aero", p => p.category == PartCategories.Aero, "")
 
EditorPartListFilter
< AvailablePart
filterCargo = new EditorPartListFilter<AvailablePart>("Function_Cargo", p => p.category == PartCategories.Cargo, "")
 
EditorPartListFilter
< AvailablePart
filterCommunication = new EditorPartListFilter<AvailablePart>("Function_Communication", p => p.category == PartCategories.Communication, "")
 
EditorPartListFilter
< AvailablePart
filterControl = new EditorPartListFilter<AvailablePart>("Function_Control", p => p.category == PartCategories.Control, "")
 
EditorPartListFilter
< AvailablePart
filterCoupling = new EditorPartListFilter<AvailablePart>("Function_Coupling", p => p.category == PartCategories.Coupling, "")
 
EditorPartListFilter
< AvailablePart
filterElectrical = new EditorPartListFilter<AvailablePart>("Function_Electrical", p => p.category == PartCategories.Electrical, "")
 
EditorPartListFilter
< AvailablePart
filterEngine = new EditorPartListFilter<AvailablePart>("Function_Engine", p => p.category == PartCategories.Engine || (p.category == PartCategories.Propulsion && p.moduleInfos.Exists(q => q.moduleName == "Engine")), "")
 
EditorPartListFilter
< AvailablePart
filterFuelTank = new EditorPartListFilter<AvailablePart>("Function_FuelTank", p => p.category == PartCategories.FuelTank || (p.category == PartCategories.Propulsion && !p.moduleInfos.Exists(q => q.moduleName == "Engine")), "")
 
EditorPartListFilter
< AvailablePart
filterGround = new EditorPartListFilter<AvailablePart>("Function_Ground", p => p.category == PartCategories.Ground, "")
 
EditorPartListFilter
< AvailablePart
filterPayload = new EditorPartListFilter<AvailablePart>("Function_Payload", p => p.category == PartCategories.Payload, "")
 
EditorPartListFilter
< AvailablePart
filterPods = new EditorPartListFilter<AvailablePart>("Function_Pods", p => p.category == PartCategories.Pods, "")
 
EditorPartListFilter
< AvailablePart
filterRobotics = new EditorPartListFilter<AvailablePart>("Function_Robotics", p => p.category == PartCategories.Robotics, "")
 
EditorPartListFilter
< AvailablePart
filterScience = new EditorPartListFilter<AvailablePart>("Function_Science", p => p.category == PartCategories.Science, "")
 
EditorPartListFilter
< AvailablePart
filterStructural = new EditorPartListFilter<AvailablePart>("Function_Structural", p => p.category == PartCategories.Structural, "")
 
EditorPartListFilter
< AvailablePart
filterThermal = new EditorPartListFilter<AvailablePart>("Function_Thermal", p => p.category == PartCategories.Thermal, "")
 
EditorPartListFilter
< AvailablePart
filterUtility = new EditorPartListFilter<AvailablePart>("Function_Utility", p => p.category == PartCategories.Utility, "")
 
GameObject iconLoaderPrefab
 
Image searchFieldBackground
 
PointerClickHandler searchFieldClickHandler
 
Coroutine searchRoutine
 
float searchTimer = 0f
 

Additional Inherited Members

- Static Public Member Functions inherited from KSP.UI.Screens.BasePartCategorizer
static string GeneratePartAutoTags (AvailablePart p)
 
static string[] SearchTagSplit (string terms)
 
- Protected Types inherited from KSP.UI.Screens.BasePartCategorizer
enum  MatchType {
  MatchType.NONE, MatchType.EQUALS_ONLY, MatchType.TERM_STARTS_WITH_TAG, MatchType.TERM_ENDS_WITH_TAG,
  MatchType.TAG_STARTS_WITH_TERM, MatchType.TAG_ENDS_WITH_TERM, MatchType.EITHER_STARTS_WITH_EITHER, MatchType.EITHER_ENDS_WITH_EITHER,
  MatchType.TERM_CONTAINS_TAG, MatchType.TAG_CONTAINS_TERM, MatchType.EITHER_CONTAINS_EITHER
}
 
- Static Protected Attributes inherited from KSP.UI.Screens.BasePartCategorizer
static string[] cargoTag = { "cargo" }
 
static string[] mannedTags = { "(crew", "(mann", "kerbal" }
 
static string[] radialTag = { "radial" }
 
static string[] size0Tags = { "0.625", ")mini", "small", "tiny", "little", "micro" }
 
static string[] size1p5Tags = { "1.875", "FL-TX", "regular", "standard", "average", "medium" }
 
static string[] size1Tags = { "1.25", "FL-T", "regular", "standard", "average", "medium" }
 
static string[] size2Tags = { "2.5", "huge", "jumbo", "large", "big" }
 
static string[] size3Tags = { "3.75", "enormous", "massive", "gigantic", "giant" }
 
static string[] size4Tags = { "5", "enormous", "massive", "gigantic", "giant" }
 
static string[] srfTags = { "surface", "attach" }
 
static string[] unmannedTags = { "(uncrew", "(unmann" }
 
static string[] xfeedTags = { "cross", "feed" }
 

Member Function Documentation

MEPartCategorizerButton Expansions.Missions.Editor.MEPartCategorizer.InstantiatePartCategorizerButton ( string  categoryName,
string  tooltip,
Icon  icon,
Color  colorButton,
Color  colorIcon,
EditorPartListFilter< AvailablePart filter 
)
inlineprotected

Initialize a part categorizer button and creates a cache of parts used in that category

Parameters
categoryNameName of the new category button
iconIcon to be displayed in the button
colorButtonColor of the button background
colorIconColor of the displayed icon
filterFilter used in this category
Returns
void Expansions.Missions.Editor.MEPartCategorizer.OnPointerDown ( PointerEventData  data)
inline
void Expansions.Missions.Editor.MEPartCategorizer.OnPointerUp ( PointerEventData  data)
inline
void Expansions.Missions.Editor.MEPartCategorizer.PartSelected ( AvailablePart  part,
bool  status 
)
inline

Triggered when a part selection changes, and evalutes the current category part list to see if the category indicator should be on or off

Parameters
categoryParts
status
void Expansions.Missions.Editor.MEPartCategorizer.Reset ( )
inline

Reset the categories to the new values of the MEPartSelectorBrowser

override void Expansions.Missions.Editor.MEPartCategorizer.SearchFilterResult ( EditorPartListFilter< AvailablePart filter)
inlineprotectedvirtual
List<AvailablePart> Expansions.Missions.Editor.MEPartCategorizer.SelectedPartsOfCategory ( List< AvailablePart categoryParts,
List< string >  selectedParts 
)
inlineprotected

Gets the list of already selected parts form this category

Parameters
categoryPartsList of available parts from this category
selectedPartsList of already selected parts
Returns
void Expansions.Missions.Editor.MEPartCategorizer.Setup ( MEPartSelectorBrowser  partSelector)
inline

Setup the categories button and filters

Parameters
partSelector
selectionColor

Member Data Documentation

MEPartCategorizerButton Expansions.Missions.Editor.MEPartCategorizer.buttonPrefab
float Expansions.Missions.Editor.MEPartCategorizer.scrollStep = 0.1f
Color Expansions.Missions.Editor.MEPartCategorizer.selectionColor
protected

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