v3.11.4 Documentation
Fungus.EditorUtils.BasePopupWindowContent Class Referenceabstract

Common base for PopupWindowContent that is a search filterable list a la AddComponent More...

Inheritance diagram for Fungus.EditorUtils.BasePopupWindowContent:
Fungus.EditorUtils.CommandSelectorPopupWindowContent Fungus.EditorUtils.EventSelectorPopupWindowContent Fungus.EditorUtils.VariableSelectPopupWindowContent

Classes

class  FilteredListItem
 Internal representation of 1 row of our popup list More...
 

Public Member Functions

 BasePopupWindowContent (string currentHandlerName, int width, int height, bool showNoneOption=false)
 
override void OnGUI (Rect rect)
 
override Vector2 GetWindowSize ()
 

Protected Member Functions

abstract void SelectByOrigIndex (int index)
 Called when the user has confirmed an item from the menu. More...
 
abstract void PrepareAllItems ()
 Called during Base Ctor, must fill allItems list so the ctor can continue to fill the visible items and current selected index. More...
 

Protected Attributes

int hoverIndex
 
readonly string SEARCH_CONTROL_NAME = "PopupSearchControlName"
 
readonly float ROW_HEIGHT = EditorGUIUtility.singleLineHeight
 
List< FilteredListItemallItems = new List<FilteredListItem>()
 
string currentFilter = string.Empty
 
Vector2 scroll
 
int scrollToIndex
 
float scrollOffset
 
int currentIndex
 
Vector2 size
 
bool hasNoneOption = false
 

Static Protected Attributes

static readonly char CATEGORY_CHAR = '/'
 

Detailed Description

Common base for PopupWindowContent that is a search filterable list a la AddComponent

Inspired by https://github.com/roboryantron/UnityEditorJunkie/blob/master/Assets/SearchableEnum/Code/Editor/SearchablePopup.cs

Definition at line 14 of file BasePopupWindowContent.cs.

Constructor & Destructor Documentation

◆ BasePopupWindowContent()

Fungus.EditorUtils.BasePopupWindowContent.BasePopupWindowContent ( string  currentHandlerName,
int  width,
int  height,
bool  showNoneOption = false 
)

Definition at line 61 of file BasePopupWindowContent.cs.

Member Function Documentation

◆ GetWindowSize()

override Vector2 Fungus.EditorUtils.BasePopupWindowContent.GetWindowSize ( )

Definition at line 93 of file BasePopupWindowContent.cs.

◆ OnGUI()

override void Fungus.EditorUtils.BasePopupWindowContent.OnGUI ( Rect  rect)

Definition at line 83 of file BasePopupWindowContent.cs.

◆ PrepareAllItems()

abstract void Fungus.EditorUtils.BasePopupWindowContent.PrepareAllItems ( )
protectedpure virtual

Called during Base Ctor, must fill allItems list so the ctor can continue to fill the visible items and current selected index.

Implemented in Fungus.EditorUtils.CommandSelectorPopupWindowContent, Fungus.EditorUtils.EventSelectorPopupWindowContent, and Fungus.EditorUtils.VariableSelectPopupWindowContent.

◆ SelectByOrigIndex()

abstract void Fungus.EditorUtils.BasePopupWindowContent.SelectByOrigIndex ( int  index)
protectedpure virtual

Called when the user has confirmed an item from the menu.

Parameters
indexIndex of into the original list of items to show given to the popupcontent

Implemented in Fungus.EditorUtils.EventSelectorPopupWindowContent, Fungus.EditorUtils.VariableSelectPopupWindowContent, and Fungus.EditorUtils.CommandSelectorPopupWindowContent.

Member Data Documentation

◆ allItems

List<FilteredListItem> Fungus.EditorUtils.BasePopupWindowContent.allItems = new List<FilteredListItem>()
protected

Definition at line 48 of file BasePopupWindowContent.cs.

◆ CATEGORY_CHAR

readonly char Fungus.EditorUtils.BasePopupWindowContent.CATEGORY_CHAR = '/'
staticprotected

Definition at line 59 of file BasePopupWindowContent.cs.

◆ currentFilter

string Fungus.EditorUtils.BasePopupWindowContent.currentFilter = string.Empty
protected

Definition at line 50 of file BasePopupWindowContent.cs.

◆ currentIndex

int Fungus.EditorUtils.BasePopupWindowContent.currentIndex
protected

Definition at line 54 of file BasePopupWindowContent.cs.

◆ hasNoneOption

bool Fungus.EditorUtils.BasePopupWindowContent.hasNoneOption = false
protected

Definition at line 56 of file BasePopupWindowContent.cs.

◆ hoverIndex

int Fungus.EditorUtils.BasePopupWindowContent.hoverIndex
protected

Definition at line 45 of file BasePopupWindowContent.cs.

◆ ROW_HEIGHT

readonly float Fungus.EditorUtils.BasePopupWindowContent.ROW_HEIGHT = EditorGUIUtility.singleLineHeight
protected

Definition at line 47 of file BasePopupWindowContent.cs.

◆ scroll

Vector2 Fungus.EditorUtils.BasePopupWindowContent.scroll
protected

Definition at line 51 of file BasePopupWindowContent.cs.

◆ scrollOffset

float Fungus.EditorUtils.BasePopupWindowContent.scrollOffset
protected

Definition at line 53 of file BasePopupWindowContent.cs.

◆ scrollToIndex

int Fungus.EditorUtils.BasePopupWindowContent.scrollToIndex
protected

Definition at line 52 of file BasePopupWindowContent.cs.

◆ SEARCH_CONTROL_NAME

readonly string Fungus.EditorUtils.BasePopupWindowContent.SEARCH_CONTROL_NAME = "PopupSearchControlName"
protected

Definition at line 46 of file BasePopupWindowContent.cs.

◆ size

Vector2 Fungus.EditorUtils.BasePopupWindowContent.size
protected

Definition at line 55 of file BasePopupWindowContent.cs.


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