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


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.

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>()

Definition at line 48 of file BasePopupWindowContent.cs.


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

Definition at line 59 of file BasePopupWindowContent.cs.

◆ currentFilter

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

Definition at line 50 of file BasePopupWindowContent.cs.

◆ currentIndex

int Fungus.EditorUtils.BasePopupWindowContent.currentIndex

Definition at line 54 of file BasePopupWindowContent.cs.

◆ hasNoneOption

bool Fungus.EditorUtils.BasePopupWindowContent.hasNoneOption = false

Definition at line 56 of file BasePopupWindowContent.cs.

◆ hoverIndex

int Fungus.EditorUtils.BasePopupWindowContent.hoverIndex

Definition at line 45 of file BasePopupWindowContent.cs.


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

Definition at line 47 of file BasePopupWindowContent.cs.

◆ scroll

Vector2 Fungus.EditorUtils.BasePopupWindowContent.scroll

Definition at line 51 of file BasePopupWindowContent.cs.

◆ scrollOffset

float Fungus.EditorUtils.BasePopupWindowContent.scrollOffset

Definition at line 53 of file BasePopupWindowContent.cs.

◆ scrollToIndex

int Fungus.EditorUtils.BasePopupWindowContent.scrollToIndex

Definition at line 52 of file BasePopupWindowContent.cs.


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

Definition at line 46 of file BasePopupWindowContent.cs.

◆ size

Vector2 Fungus.EditorUtils.BasePopupWindowContent.size

Definition at line 55 of file BasePopupWindowContent.cs.

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