Class Widget
- Namespace
- TaleWorlds.GauntletUI.BaseTypes
- Assembly
- TaleWorlds.GauntletUI.dll
public class Widget : PropertyOwnerObject
- Inheritance
-
Widget
- Derived
- Inherited Members
- Extension Methods
Constructors
Widget(UIContext)
public Widget(UIContext context)
Parameters
context
UIContext
Fields
AcceptDropHandler
public Func<Widget, Widget, bool> AcceptDropHandler
Field Value
OnGamepadNavigationFocusGained
public Action<Widget> OnGamepadNavigationFocusGained
Field Value
_cachedGlobalPosition
protected Vector2 _cachedGlobalPosition
Field Value
_calculateSizeFirstFrame
protected bool _calculateSizeFirstFrame
Field Value
_currentVisualStateAnimationState
protected VisualStateAnimationState _currentVisualStateAnimationState
Field Value
_gamepadNavigationIndex
protected int _gamepadNavigationIndex
Field Value
_seed
protected int _seed
Field Value
_startVisualState
protected VisualState _startVisualState
Field Value
_stateTimer
protected float _stateTimer
Field Value
Properties
AcceptDrag
[Editor(false)]
public bool AcceptDrag { get; set; }
Property Value
AcceptDrop
[Editor(false)]
public bool AcceptDrop { get; set; }
Property Value
AcceptNavigation
public bool AcceptNavigation { get; set; }
Property Value
AllChildren
public IEnumerable<Widget> AllChildren { get; }
Property Value
AllChildrenAndThis
public IEnumerable<Widget> AllChildrenAndThis { get; }
Property Value
AlphaFactor
public float AlphaFactor { get; set; }
Property Value
AlternateClickEventHasSpecialEvent
[Editor(false)]
public bool AlternateClickEventHasSpecialEvent { get; set; }
Property Value
Bottom
public float Bottom { get; }
Property Value
CanAcceptEvents
[Editor(false)]
public bool CanAcceptEvents { get; set; }
Property Value
ChildCount
public int ChildCount { get; }
Property Value
Children
public List<Widget> Children { get; }
Property Value
CircularClipEnabled
[Editor(false)]
public bool CircularClipEnabled { get; set; }
Property Value
CircularClipRadius
[Editor(false)]
public float CircularClipRadius { get; set; }
Property Value
CircularClipSmoothingRadius
[Editor(false)]
public float CircularClipSmoothingRadius { get; set; }
Property Value
CircularClipXOffset
[Editor(false)]
public float CircularClipXOffset { get; set; }
Property Value
CircularClipYOffset
[Editor(false)]
public float CircularClipYOffset { get; set; }
Property Value
ClipContents
[Editor(false)]
public bool ClipContents { get; set; }
Property Value
ClipHorizontalContent
[Editor(false)]
public bool ClipHorizontalContent { get; set; }
Property Value
ClipVerticalContent
[Editor(false)]
public bool ClipVerticalContent { get; set; }
Property Value
Color
public Color Color { get; set; }
Property Value
ColorFactor
public float ColorFactor { get; set; }
Property Value
Context
public UIContext Context { get; }
Property Value
CurrentState
public string CurrentState { get; protected set; }
Property Value
CursorAreaXOffset
public float CursorAreaXOffset { get; set; }
Property Value
CursorAreaYOffset
public float CursorAreaYOffset { get; set; }
Property Value
DisableRender
public bool DisableRender { get; set; }
Property Value
DoNotAcceptEvents
[Editor(false)]
public bool DoNotAcceptEvents { get; set; }
Property Value
DoNotAcceptNavigation
public bool DoNotAcceptNavigation { get; set; }
Property Value
DoNotPassEventsToChildren
[Editor(false)]
public bool DoNotPassEventsToChildren { get; set; }
Property Value
DoNotRenderIfNotFullyInsideScissor
[Editor(false)]
public bool DoNotRenderIfNotFullyInsideScissor { get; set; }
Property Value
DoNotUseCustomScale
public bool DoNotUseCustomScale { get; set; }
Property Value
DoNotUseCustomScaleAndChildren
[Editor(false)]
public bool DoNotUseCustomScaleAndChildren { get; set; }
Property Value
DragWidget
[Editor(false)]
public Widget DragWidget { get; set; }
Property Value
DropEventHandledManually
[Editor(false)]
public bool DropEventHandledManually { get; set; }
Property Value
EventManager
public EventManager EventManager { get; }
Property Value
ExtendBottom
public float ExtendBottom { get; set; }
Property Value
ExtendCursorAreaBottom
public float ExtendCursorAreaBottom { get; set; }
Property Value
ExtendCursorAreaLeft
public float ExtendCursorAreaLeft { get; set; }
Property Value
ExtendCursorAreaRight
public float ExtendCursorAreaRight { get; set; }
Property Value
ExtendCursorAreaTop
public float ExtendCursorAreaTop { get; set; }
Property Value
ExtendLeft
public float ExtendLeft { get; set; }
Property Value
ExtendRight
public float ExtendRight { get; set; }
Property Value
ExtendTop
public float ExtendTop { get; set; }
Property Value
FixedHeight
public bool FixedHeight { get; }
Property Value
FixedWidth
public bool FixedWidth { get; }
Property Value
ForcePixelPerfectRenderPlacement
[Editor(false)]
public bool ForcePixelPerfectRenderPlacement { get; set; }
Property Value
FrictionEnabled
public bool FrictionEnabled { get; set; }
Property Value
GamepadNavigationContext
public IGamepadNavigationContext GamepadNavigationContext { get; }
Property Value
GamepadNavigationIndex
public int GamepadNavigationIndex { get; set; }
Property Value
GlobalPosition
public Vector2 GlobalPosition { get; }
Property Value
HeightSizePolicy
[Editor(false)]
public SizePolicy HeightSizePolicy { get; set; }
Property Value
HideOnDrag
[Editor(false)]
public bool HideOnDrag { get; set; }
Property Value
HorizontalAlignment
[Editor(false)]
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
HorizontalFlip
public bool HorizontalFlip { get; set; }
Property Value
HoveredCursorState
[Editor(false)]
public string HoveredCursorState { get; set; }
Property Value
Id
[Editor(false)]
public string Id { get; set; }
Property Value
IsCircularClipRadiusHalfOfHeight
[Editor(false)]
public bool IsCircularClipRadiusHalfOfHeight { get; set; }
Property Value
IsCircularClipRadiusHalfOfWidth
[Editor(false)]
public bool IsCircularClipRadiusHalfOfWidth { get; set; }
Property Value
IsDisabled
[Editor(false)]
public bool IsDisabled { get; set; }
Property Value
IsEnabled
[Editor(false)]
public bool IsEnabled { get; set; }
Property Value
IsFocusable
[Editor(false)]
public bool IsFocusable { get; set; }
Property Value
IsFocused
public bool IsFocused { get; }
Property Value
IsHidden
[Editor(false)]
public bool IsHidden { get; set; }
Property Value
IsHovered
public bool IsHovered { get; }
Property Value
IsPressed
public bool IsPressed { get; }
Property Value
IsUsingNavigation
public bool IsUsingNavigation { get; set; }
Property Value
IsVisible
[Editor(false)]
public bool IsVisible { get; set; }
Property Value
LayoutImp
public ILayout LayoutImp { get; protected set; }
Property Value
Left
public float Left { get; }
Property Value
LocalPosition
public Vector2 LocalPosition { get; }
Property Value
MarginBottom
[Editor(false)]
public float MarginBottom { get; set; }
Property Value
MarginLeft
[Editor(false)]
public float MarginLeft { get; set; }
Property Value
MarginRight
[Editor(false)]
public float MarginRight { get; set; }
Property Value
MarginTop
[Editor(false)]
public float MarginTop { get; set; }
Property Value
MaxHeight
[Editor(false)]
public float MaxHeight { get; set; }
Property Value
MaxWidth
[Editor(false)]
public float MaxWidth { get; set; }
Property Value
MeasuredSize
public Vector2 MeasuredSize { get; }
Property Value
MinHeight
[Editor(false)]
public float MinHeight { get; set; }
Property Value
MinWidth
[Editor(false)]
public float MinWidth { get; set; }
Property Value
ParentWidget
public Widget ParentWidget { get; set; }
Property Value
Parents
public IEnumerable<Widget> Parents { get; }
Property Value
PosOffset
public Vector2 PosOffset { get; set; }
Property Value
PositionXOffset
[Editor(false)]
public float PositionXOffset { get; set; }
Property Value
PositionYOffset
[Editor(false)]
public float PositionYOffset { get; set; }
Property Value
RenderLate
[Editor(false)]
public bool RenderLate { get; set; }
Property Value
RestartAnimationFirstFrame
[Editor(false)]
public bool RestartAnimationFirstFrame { get; set; }
Property Value
Right
public float Right { get; }
Property Value
SaturationFactor
public float SaturationFactor { get; set; }
Property Value
ScaledMarginBottom
public float ScaledMarginBottom { get; }
Property Value
ScaledMarginLeft
public float ScaledMarginLeft { get; }
Property Value
ScaledMarginRight
public float ScaledMarginRight { get; }
Property Value
ScaledMarginTop
public float ScaledMarginTop { get; }
Property Value
ScaledMaxHeight
public float ScaledMaxHeight { get; }
Property Value
ScaledMaxWidth
public float ScaledMaxWidth { get; }
Property Value
ScaledMinHeight
public float ScaledMinHeight { get; }
Property Value
ScaledMinWidth
public float ScaledMinWidth { get; }
Property Value
ScaledPositionOffset
public Vector2 ScaledPositionOffset { get; }
Property Value
ScaledPositionXOffset
public float ScaledPositionXOffset { get; set; }
Property Value
ScaledPositionYOffset
public float ScaledPositionYOffset { get; set; }
Property Value
ScaledSuggestedHeight
public float ScaledSuggestedHeight { get; set; }
Property Value
ScaledSuggestedWidth
public float ScaledSuggestedWidth { get; set; }
Property Value
Size
public Vector2 Size { get; }
Property Value
Sprite
[Editor(false)]
public Sprite Sprite { get; set; }
Property Value
SuggestedHeight
[Editor(false)]
public float SuggestedHeight { get; set; }
Property Value
SuggestedWidth
[Editor(false)]
public float SuggestedWidth { get; set; }
Property Value
Tag
public object Tag { get; set; }
Property Value
Top
public float Top { get; }
Property Value
TweenPosition
[Editor(false)]
public bool TweenPosition { get; set; }
Property Value
UpdateChildrenStates
[Editor(false)]
public bool UpdateChildrenStates { get; set; }
Property Value
UseGlobalTimeForAnimation
public bool UseGlobalTimeForAnimation { get; set; }
Property Value
UseSiblingIndexForNavigation
public bool UseSiblingIndexForNavigation { get; set; }
Property Value
UsedNavigationMovements
public GamepadNavigationTypes UsedNavigationMovements { get; set; }
Property Value
ValueFactor
public float ValueFactor { get; set; }
Property Value
VerticalAlignment
[Editor(false)]
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
VerticalFlip
public bool VerticalFlip { get; set; }
Property Value
VisualDefinition
[Editor(false)]
public VisualDefinition VisualDefinition { get; set; }
Property Value
WidthSizePolicy
[Editor(false)]
public SizePolicy WidthSizePolicy { get; set; }
Property Value
_inverseScaleToUse
protected float _inverseScaleToUse { get; }
Property Value
_scaleToUse
protected float _scaleToUse { get; }
Property Value
Methods
AddChild(Widget)
public void AddChild(Widget widget)
Parameters
widget
Widget
AddChildAtIndex(Widget, int)
public void AddChildAtIndex(Widget widget, int index)
Parameters
AddComponent(WidgetComponent)
public void AddComponent(WidgetComponent component)
Parameters
component
WidgetComponent
AddState(string)
public void AddState(string stateName)
Parameters
stateName
string
ApplyActionOnAllChildren(Action<Widget>)
public void ApplyActionOnAllChildren(Action<Widget> action)
Parameters
CheckIsMyChildRecursive(Widget)
public bool CheckIsMyChildRecursive(Widget child)
Parameters
child
Widget
Returns
ContainsState(string)
public bool ContainsState(string stateName)
Parameters
stateName
string
Returns
EventFired(string, params object[])
protected void EventFired(string eventName, params object[] args)
Parameters
FindChild(string)
public Widget FindChild(string singlePathNode)
Parameters
singlePathNode
string
Returns
FindChild(string, bool)
public Widget FindChild(string id, bool includeAllChildren = false)
Parameters
Returns
FindChild(WidgetSearchDelegate)
public Widget FindChild(WidgetSearchDelegate widgetSearchDelegate)
Parameters
widgetSearchDelegate
WidgetSearchDelegate
Returns
FindChild(BindingPath)
public Widget FindChild(BindingPath path)
Parameters
path
BindingPath
Returns
GetChild(int)
public Widget GetChild(int i)
Parameters
i
int
Returns
GetChildIndex(Widget)
public int GetChildIndex(Widget child)
Parameters
child
Widget
Returns
GetComponent<T>()
public T GetComponent<T>() where T : WidgetComponent
Returns
- T
Type Parameters
T
GetFilterChildIndex(Widget, Func<Widget, bool>)
public int GetFilterChildIndex(Widget child, Func<Widget, bool> childrenFilter)
Parameters
Returns
GetLocalPoint(Vector2)
public Vector2 GetLocalPoint(Vector2 globalPoint)
Parameters
globalPoint
Vector2
Returns
GetSiblingIndex()
public int GetSiblingIndex()
Returns
GetVisibleChildIndex(Widget)
public int GetVisibleChildIndex(Widget child)
Parameters
child
Widget
Returns
GetVisibleSiblingIndex()
public int GetVisibleSiblingIndex()
Returns
HandleInput(IReadOnlyList<int>)
public virtual void HandleInput(IReadOnlyList<int> lastKeysPressed)
Parameters
lastKeysPressed
IReadOnlyList<int>
HasChild(Widget)
public bool HasChild(Widget widget)
Parameters
widget
Widget
Returns
Hide()
public void Hide()
IsPointInsideGamepadCursorArea(Vector2)
public bool IsPointInsideGamepadCursorArea(Vector2 p)
Parameters
p
Vector2
Returns
IsPointInsideMeasuredArea(Vector2)
public bool IsPointInsideMeasuredArea(Vector2 p)
Parameters
p
Vector2
Returns
IsRecursivelyVisible()
public bool IsRecursivelyVisible()
Returns
Layout(float, float, float, float)
public void Layout(float left, float bottom, float right, float top)
Parameters
Measure(Vector2)
public void Measure(Vector2 measureSpec)
Parameters
measureSpec
Vector2
OnAfterChildRemoved(Widget)
protected virtual void OnAfterChildRemoved(Widget child)
Parameters
child
Widget
OnBeforeRemovedChild(Widget)
public virtual void OnBeforeRemovedChild(Widget widget)
Parameters
widget
Widget
OnChildAdded(Widget)
protected virtual void OnChildAdded(Widget child)
Parameters
child
Widget
OnChildRemoved(Widget)
protected virtual void OnChildRemoved(Widget child)
Parameters
child
Widget
OnConnectedToRoot()
protected virtual void OnConnectedToRoot()
OnDisconnectedFromRoot()
protected virtual void OnDisconnectedFromRoot()
OnDragBegin()
protected virtual void OnDragBegin()
OnDragEnd()
protected virtual void OnDragEnd()
OnDragHoverBegin()
protected virtual void OnDragHoverBegin()
OnDragHoverEnd()
protected virtual void OnDragHoverEnd()
OnDrop()
protected virtual bool OnDrop()
Returns
OnGainFocus()
protected virtual void OnGainFocus()
OnGamepadNavigationFocusGain()
public void OnGamepadNavigationFocusGain()
OnGamepadNavigationIndexUpdated(int)
protected virtual void OnGamepadNavigationIndexUpdated(int newIndex)
Parameters
newIndex
int
OnHoverBegin()
protected virtual void OnHoverBegin()
OnHoverEnd()
protected virtual void OnHoverEnd()
OnLateUpdate(float)
protected virtual void OnLateUpdate(float dt)
Parameters
dt
float
OnLoseFocus()
protected virtual void OnLoseFocus()
OnMouseAlternatePressed()
protected virtual void OnMouseAlternatePressed()
OnMouseAlternateReleased()
protected virtual void OnMouseAlternateReleased()
OnMouseMove()
protected virtual void OnMouseMove()
OnMouseOverBegin()
protected virtual void OnMouseOverBegin()
OnMouseOverEnd()
protected virtual void OnMouseOverEnd()
OnMousePressed()
protected virtual void OnMousePressed()
OnMouseReleased()
protected virtual void OnMouseReleased()
OnMouseScroll()
protected virtual void OnMouseScroll()
OnParallelUpdate(float)
protected virtual void OnParallelUpdate(float dt)
Parameters
dt
float
OnPreviewDragBegin()
protected virtual bool OnPreviewDragBegin()
Returns
OnPreviewDragEnd()
protected virtual bool OnPreviewDragEnd()
Returns
OnPreviewDragHover()
protected virtual bool OnPreviewDragHover()
Returns
OnPreviewDrop()
protected virtual bool OnPreviewDrop()
Returns
OnPreviewMouseAlternatePressed()
protected virtual bool OnPreviewMouseAlternatePressed()
Returns
OnPreviewMouseAlternateReleased()
protected virtual bool OnPreviewMouseAlternateReleased()
Returns
OnPreviewMouseMove()
protected virtual bool OnPreviewMouseMove()
Returns
OnPreviewMousePressed()
protected virtual bool OnPreviewMousePressed()
Returns
OnPreviewMouseReleased()
protected virtual bool OnPreviewMouseReleased()
Returns
OnPreviewMouseScroll()
protected virtual bool OnPreviewMouseScroll()
Returns
OnPreviewRightStickMovement()
protected virtual bool OnPreviewRightStickMovement()
Returns
OnRender(TwoDimensionContext, TwoDimensionDrawContext)
protected virtual void OnRender(TwoDimensionContext twoDimensionContext, TwoDimensionDrawContext drawContext)
Parameters
twoDimensionContext
TwoDimensionContextdrawContext
TwoDimensionDrawContext
OnRightStickMovement()
protected virtual void OnRightStickMovement()
OnUpdate(float)
protected virtual void OnUpdate(float dt)
Parameters
dt
float
RefreshState()
protected virtual void RefreshState()
RemoveAllChildren()
public void RemoveAllChildren()
RemoveChild(Widget)
public void RemoveChild(Widget widget)
Parameters
widget
Widget
Render(TwoDimensionContext, TwoDimensionDrawContext)
public void Render(TwoDimensionContext twoDimensionContext, TwoDimensionDrawContext drawContext)
Parameters
twoDimensionContext
TwoDimensionContextdrawContext
TwoDimensionDrawContext
SetLayoutDirty()
protected void SetLayoutDirty()
SetMeasureAndLayoutDirty()
protected void SetMeasureAndLayoutDirty()
SetMeasureDirty()
protected void SetMeasureDirty()
SetSiblingIndex(int, bool)
public void SetSiblingIndex(int index, bool force = false)
Parameters
SetState(string)
public virtual void SetState(string stateName)
Parameters
stateName
string
Show()
public void Show()
SwapChildren(Widget, Widget)
public void SwapChildren(Widget widget1, Widget widget2)
Parameters
ToString()
public override string ToString()
Returns
UpdateAnimationPropertiesSubTask(float)
public virtual void UpdateAnimationPropertiesSubTask(float alphaFactor)
Parameters
alphaFactor
float
UpdateBrushes(float)
public virtual void UpdateBrushes(float dt)
Parameters
dt
float
Events
EventFire
public event Action<Widget, string, object[]> EventFire
Event Type
OnVisibilityChanged
public event Action<Widget> OnVisibilityChanged
Event Type
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).