mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add tooltip to sliderbars. Move interface.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Graphics.Cursor
|
||||
namespace osu.Game.Graphics
|
||||
{
|
||||
public interface IHasTooltip : IDrawable
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using OpenTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
@ -12,7 +13,7 @@ using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public class OsuSliderBar<U> : SliderBar<U> where U : struct
|
||||
public class OsuSliderBar<U> : SliderBar<U>, IHasTooltip where U : struct
|
||||
{
|
||||
private SampleChannel sample;
|
||||
private double lastSampleTime;
|
||||
@ -21,6 +22,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private readonly Box leftBox;
|
||||
private readonly Box rightBox;
|
||||
|
||||
public string TooltipText => Current.Value.ToString();
|
||||
|
||||
public OsuSliderBar()
|
||||
{
|
||||
Height = 12;
|
||||
|
Reference in New Issue
Block a user