A game framework written with osu! in mind.
at master 34 lines 1.1 kB 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 osuTK; 5 6namespace osu.Framework.Graphics.Cursor 7{ 8 /// <summary> 9 /// A tooltip that can be used in conjunction with a <see cref="TooltipContainer"/> and/or <see cref="IHasCustomTooltip"/> implementation. 10 /// </summary> 11 public interface ITooltip : IDrawable 12 { 13 /// <summary> 14 /// Set new content be displayed on this tooltip. 15 /// </summary> 16 /// <param name="content">The content to be displayed.</param> 17 void SetContent(object content); 18 19 /// <summary> 20 /// Moves the tooltip to the given position. May use easing. 21 /// </summary> 22 /// <param name="pos">The position the tooltip should be moved to.</param> 23 void Move(Vector2 pos); 24 } 25 26 /// <inheritdoc /> 27 public interface ITooltip<in T> : ITooltip 28 { 29 void ITooltip.SetContent(object content) => SetContent((T)content); 30 31 /// <inheritdoc cref="ITooltip.SetContent"/> 32 void SetContent(T content); 33 } 34}