private void UpdatePresentation(CoreUIEvent e) { InitIfRequired(); for (var index = 0; index < _coreUiPresentationParent.Presentations.Count; index++) { _coreUiPresentationParent.Presentations[index].UpdateSelf(e); } }
public virtual void UpdateSelf(CoreUIEvent e) { UpdateTexture(); UpdateQueue(); UpdateActive(); UpdateVertialLimit(); _mesh.mesh = _element.Mesh; }
public override bool Update(CoreUIEvent e) { var focused = base.Update(e); HandlePressing(e, focused); _prevPressed = Pressed; return(focused); }
public override bool Update(CoreUIEvent e) { var focus = base.Update(e); if (focus) { HandleEvent(e); } HandleMouse(e); UpdatePointPosition(); return(focus); }
public override bool Update(CoreUIEvent e) { var focus = base.Update(e); if (_verticalSlider != null) { ScrollVerticalValue = 1 - _verticalSlider.Value; } if (_horizontalSlider != null) { ScrollHorizontalValue = _horizontalSlider.Value; } return(focus); }
public virtual bool Update(CoreUIEvent e) { var focus = Contains(e.PointerPosition); if (focus && e.PointerDown) { _pressed = true; } if (e.PointerUp) { _pressed = false; } return(focus); }
private void HandleMouse(CoreUIEvent e) { if (!Point.Pressed) { return; } if (_orientation == CoreUIOrientation.Horizontal) { Value = Mathf.InverseLerp(X + _borderWidth, X + Width - _borderWidth, e.PointerPosition.x); } else { Value = Mathf.InverseLerp(Y - Height + _borderWidth, Y - _borderWidth, e.PointerPosition.y); } }
private void HandlePressing(CoreUIEvent e, bool focused) { if (_prevPressed && e.PointerUp && focused) { InvokePressing(); } if (Pressed) { _coreUIMesh.Texture = _pressedTexture; } else { _coreUIMesh.Texture = _unpressedTexture; } }
public override bool Update(CoreUIEvent e) { if (!Active || !Enabled) { return(false); } var focused = base.Update(e); if (!focused) { e.DropPointerData(); } for (var index = 0; index < _elements.Count; index++) { var element = _elements[index]; if (!element.Active || !element.Enabled) { continue; } var elementFocus = element.Update(e); focused = focused || elementFocus; } return(focused); }
private void HandleEvent(CoreUIEvent e) { Value = Value + e.ScrollDir * _delta; }
protected virtual bool ElementEnable(CoreUIEvent e) { return(_coreUIMesh.Rect.Contains(e.PointerPosition)); }
public override void UpdateSelf(CoreUIEvent e) { base.UpdateSelf(e); _element.Update(e); }
public override bool Update(CoreUIEvent e) { _textMesh.TextGenerator.Update(); _textMesh.ApplyTextMesh(); return(base.Update(e)); }