A game framework written with osu! in mind.
at master 21 lines 979 B view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2// See the LICENCE file in the repository root for full licence text. 3 4using osu.Framework.Graphics.Containers; 5using osuTK; 6 7namespace osu.Framework.Graphics.UserInterface 8{ 9 /// <summary> 10 /// A UI component generally used to show the current cursor location in a text edit field. 11 /// </summary> 12 public abstract class Caret : CompositeDrawable 13 { 14 /// <summary> 15 /// Request the caret be displayed at a particular location, with an optional selection length. 16 /// </summary> 17 /// <param name="position">The position (in parent space) where the caret should be displayed.</param> 18 /// <param name="selectionWidth">If a selection is active, the length (in parent space) of the selection. The caret should extend to display this selection to the user.</param> 19 public abstract void DisplayAt(Vector2 position, float? selectionWidth); 20 } 21}