Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ButtonGridDrag Class Reference
Inheritance diagram for ButtonGridDrag:
ButtonGrid UIButton IMouseHint IPrefImage IUISkin ButtonHotItem

Public Member Functions

override void SetDragParent (IDragParent p)
 
void OnDrag (PointerEventData data)
 
override void OnPointerUp (PointerEventData eventData)
 
- Public Member Functions inherited from ButtonGrid
override string ToString ()
 
Attach< T > (string id, bool rightAttach=true)
 
Transform Attach (string id, bool rightAttach=true)
 
void Dettach (string id)
 
void Reset ()
 
void SetBodySlot (BodySlot b, InvOwner owner, bool showIndex=false)
 
void Redraw ()
 
void SetCardGrid (Card c, InvOwner owner=null)
 
void SetCard (Card c, Mode mode=Mode.Default, Action< UINote > onWriteNote=null)
 
void SetArea (Area a)
 
void SetItem (GridItem i)
 
void SetObject (object o)
 
void SetDummy ()
 
virtual void SetDragParent (IDragParent p)
 
void SetIngredient (Recipe r, Recipe.Ingredient _ing)
 
void SetIngredient (Recipe r, Thing t)
 
void SetRecipeVariation (UIRecipeInfo.RecipeVariation a)
 
void SetRecipe ()
 
void SetRecipe (Area a)
 
void SetRecipe (Recipe r)
 
void RefreshCraftable ()
 
void SetCraftRecipe (Recipe r, Mode mode, bool tooltip=false)
 
void WriteReqMat (UINote n, Recipe r)
 
bool ShowMouseHintLeft ()
 
string GetTextMouseHintLeft ()
 
bool ShowMouseHintRight ()
 
string GetTextMouseHintRight ()
 
RenderRow GetRenderRow ()
 
void OnRefreshPref ()
 
override bool CanMiddleClick ()
 
override void OnMiddleClick (bool forceClick)
 
- Public Member Functions inherited from UIButton
virtual bool CanMiddleClick ()
 
virtual void OnMiddleClick (bool forceClick)
 
void SetItem (Item i)
 
virtual void RefreshItem ()
 
virtual void OnHover ()
 
void Toggle ()
 
void ToggleCheck ()
 
void SetCheck (bool check)
 
void SetToggle (bool isOn, Action< bool > onToggle=null)
 
void SetToggleWithScore (bool isOn, Action< bool > onToggle, int? score)
 
void SetTooltip (Action< UITooltip > onShowTooltip=null, bool enable=true)
 
void SetTooltip (string id, Action< UITooltip > onShowTooltip=null, bool enable=true)
 
void SetTooltipLang (string lang=null)
 
virtual void ShowTooltip ()
 
void ShowTooltipForced (bool ignoreWhenRightClick=true)
 
override void OnPointerDown (PointerEventData eventData)
 
override void OnPointerClick (PointerEventData eventData)
 
override void OnPointerUp (PointerEventData eventData)
 
void OnPointerUpOnDrag (PointerEventData eventData)
 
void _OnPress ()
 
void OnPress ()
 
void AddHighlight (Func< bool > killCondition)
 
void DoHighlightTransition (bool instant=false)
 
void DoNormalTransition (bool instant=true)
 
override Selectable FindSelectableOnDown ()
 
override Selectable FindSelectableOnUp ()
 
override Selectable FindSelectableOnLeft ()
 
override Selectable FindSelectableOnRight ()
 
void SetNavigation (UIButton up, UIButton down=null, UIButton left=null, UIButton right=null)
 
override bool IsActive ()
 
void SetInteractableWithAlpha (bool enable)
 
virtual void ApplySkin ()
 
void ApplySkin ()
 
bool ShowMouseHintLeft ()
 
string GetTextMouseHintLeft ()
 
bool ShowMouseHintRight ()
 
string GetTextMouseHintRight ()
 
RenderRow GetRenderRow ()
 
void OnRefreshPref ()
 

Public Attributes

IDragParent dragParent
 
bool dragged
 
- Public Attributes inherited from ButtonGrid
Area area
 
Recipe recipe
 
Recipe.Ingredient ing
 
Card card
 
int index
 
InvOwner invOwner
 
bool keepBg
 
List< Transform > listAttach = new List<Transform>()
 
- Public Attributes inherited from UIButton
UIText mainText
 
UIText subText
 
UIText subText2
 
UIText keyText
 
Image icon
 
Image imageCheck
 
Graphic[] targetGraphics
 
float scaleIcon = 1f
 
float slideX
 
float navigationFix
 
bool isChecked
 
bool instantClick = true
 
UISelectableGroup group
 
TooltipData tooltip
 
SoundData soundClick
 
SoundData soundHighlight
 
Transform animeTarget
 
Anime animeClick
 
Anime animeHold
 
ButtonType buttonType
 
BaseSkinRoot skinRoot
 
Action onDoubleClick
 
Action onRightClick
 
Action< int > onInputWheel
 
object refObj
 
int refInt
 
string refStr
 
bool animating
 
bool selected
 
Vector3 originalIconScale = Vector3.one
 
UIButton highlightTarget
 
Item item
 

Additional Inherited Members

- Public Types inherited from ButtonGrid
enum  Mode {
  Default , Grid , Ingredient , Recipe ,
  RecipeGrid , Search
}
 
- Static Public Member Functions inherited from UIButton
static void UpdateButtons ()
 
static void TryHihlight ()
 
static void TryShowTip (Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
 
static void TryShowTip< T > (Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
 
- Static Public Attributes inherited from UIButton
static bool DoSlide
 
static bool locked
 
static UIButton lastButton
 
static UIButton lastHovered
 
static UIButton currentHighlight
 
static UIButton currentPressedButton
 
static float lastClicked
 
static float doubleClickTime = 0.4f
 
static Vector2 buttonPos
 
static Action onPressed
 
static List< UIButtonbuttons = new List<UIButton>()
 
static Action actionTooltip
 
- Protected Member Functions inherited from ButtonGrid
override void OnDestroy ()
 
- Protected Member Functions inherited from UIButton
override void Awake ()
 
override void OnEnable ()
 
override void DoStateTransition (SelectionState state, bool instant)
 
- Properties inherited from ButtonGrid
ColorProfile Colors [get]
 
Card Card [get]
 
virtual float extFixY [get]
 
- Properties inherited from UIButton
List< Graphic > Graphics [get]
 
virtual bool CanDragLeftButton [get]
 

Detailed Description

Definition at line 4 of file ButtonGridDrag.cs.

Member Function Documentation

◆ OnDrag()

void ButtonGridDrag.OnDrag ( PointerEventData  data)
inline

Definition at line 16 of file ButtonGridDrag.cs.

17 {
18 if (dragParent != null && (!CanDragLeftButton || data.button == PointerEventData.InputButton.Left) && (CanDragLeftButton || data.button == PointerEventData.InputButton.Right))
19 {
20 if (!dragged)
21 {
22 SE.DragStart();
23 dragged = true;
26 }
27 else
28 {
29 dragParent.OnDrag(this);
30 }
31 }
32 }
IDragParent dragParent
virtual bool CanDragLeftButton
Definition: UIButton.cs:210
void OnPointerUpOnDrag(PointerEventData eventData)
Definition: UIButton.cs:488
void OnStartDrag(UIButton b)
void OnDrag(UIButton b)

References UIButton.CanDragLeftButton, dragged, dragParent, IDragParent.OnDrag(), UIButton.OnPointerUpOnDrag(), and IDragParent.OnStartDrag().

◆ OnPointerUp()

override void ButtonGridDrag.OnPointerUp ( PointerEventData  eventData)
inline

Definition at line 34 of file ButtonGridDrag.cs.

35 {
36 if (dragged)
37 {
38 dragged = false;
41 }
42 else
43 {
44 base.OnPointerUp(eventData);
45 }
46 }
static void RefreshAllList()
Definition: UIInventory.cs:198
void OnEndDrag(UIButton b, bool cancel=false)

References dragged, dragParent, IDragParent.OnEndDrag(), and UIInventory.RefreshAllList().

◆ SetDragParent()

override void ButtonGridDrag.SetDragParent ( IDragParent  p)
inlinevirtual

Reimplemented from ButtonGrid.

Definition at line 11 of file ButtonGridDrag.cs.

12 {
13 dragParent = p;
14 }

References dragParent.

Member Data Documentation

◆ dragged

bool ButtonGridDrag.dragged

Definition at line 9 of file ButtonGridDrag.cs.

Referenced by OnDrag(), and OnPointerUp().

◆ dragParent

IDragParent ButtonGridDrag.dragParent

Definition at line 6 of file ButtonGridDrag.cs.

Referenced by OnDrag(), OnPointerUp(), ButtonHotItem.RefreshItem(), and SetDragParent().


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