Class AClickableElementUI
Base class for any UI element in the scenario editor. It handles mouse events and selection.
Inheritance
Focusable
AClickableElementUI
Assembly: Xareus.Scenarios.Unity.Edition.dll
Syntax
public abstract class AClickableElementUI : ABaseScenarioElementUI
Constructors
AClickableElementUI(CanvasUI)
Declaration
protected AClickableElementUI(CanvasUI canvas)
Parameters
Fields
canvas
Declaration
protected CanvasUI canvas
Field Value
clickCount
Declaration
protected float clickCount
Field Value
Properties
Canvas
Declaration
public CanvasUI Canvas { get; }
Property Value
Data
The data associated with this UI element. This can be null if the element is based on other elements' data.
Declaration
public abstract object Data { get; }
Property Value
IsSelected
Declaration
public bool IsSelected { get; set; }
Property Value
Label
Declaration
public string Label { get; set; }
Property Value
Methods
DeleteUIElement()
Declaration
public abstract void DeleteUIElement()
DoDeleteGuiElement()
Declaration
protected void DoDeleteGuiElement()
DrawLabel()
Declaration
protected virtual void DrawLabel()
HandleOnDeselected()
Declaration
protected virtual void HandleOnDeselected()
HandleOnSelected()
Declaration
protected virtual void HandleOnSelected()
IsSelectedByElement(VisualElement)
Check if the movable element is selected by the given visual element. A movable element is selected if any part of the visual element overlaps with the movable element content rect
Declaration
public virtual bool IsSelectedByElement(VisualElement selectionElement)
Parameters
Returns
Exceptions
OnDoubleClick(AClickableElementUI)
Declaration
protected virtual void OnDoubleClick(AClickableElementUI args)
Parameters
OnGeometryChanged(GeometryChangedEvent)
Declaration
protected virtual void OnGeometryChanged(GeometryChangedEvent evt)
Parameters
OnLabelGet()
Declaration
protected abstract string OnLabelGet()
Returns
OnLeftClick(ClickEvent)
Declaration
protected virtual void OnLeftClick(ClickEvent evt)
Parameters
Type |
Name |
Description |
ClickEvent |
evt |
|
OnMouseDown(MouseDownEvent)
Declaration
protected virtual void OnMouseDown(MouseDownEvent evt)
Parameters
OnMouseUp(MouseUpEvent)
Declaration
protected virtual void OnMouseUp(MouseUpEvent evt)
Parameters
OnRightClick()
Declaration
protected virtual void OnRightClick()
OnSimpleClick()
Declaration
protected virtual void OnSimpleClick()
Declaration
protected virtual void OpenContextMenu(ContextualMenuPopulateEvent evt)
Parameters
SetLabel(string)
Declaration
protected abstract void SetLabel(string label)
Parameters
Type |
Name |
Description |
string |
label |
|
UpdatePosition()
Declaration
protected virtual void UpdatePosition()
UpdateUI()
Declaration
public virtual void UpdateUI()
Events
Delete
Declaration
public event EventHandler<AClickableElementUI> Delete
Event Type
DoubleClick
Declaration
public event EventHandler<AClickableElementUI> DoubleClick
Event Type
RightClick
Declaration
public event EventHandler<AClickableElementUI> RightClick
Event Type
SimpleClick
Declaration
public event EventHandler<AClickableElementUI> SimpleClick
Event Type