A game framework written with osu! in mind.
at master 28 lines 961 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 System.Collections.Generic; 5using osu.Framework.Graphics; 6using osu.Framework.Input.Events; 7using osu.Framework.Input.States; 8 9namespace osu.Framework.Input 10{ 11 public class TabletPenButtonEventManager : ButtonEventManager<TabletPenButton> 12 { 13 public TabletPenButtonEventManager(TabletPenButton button) 14 : base(button) 15 { 16 } 17 18 protected override Drawable HandleButtonDown(InputState state, List<Drawable> targets) => PropagateButtonEvent(targets, new TabletPenButtonPressEvent(state, Button)); 19 20 protected override void HandleButtonUp(InputState state, List<Drawable> targets) 21 { 22 if (targets == null) 23 return; 24 25 PropagateButtonEvent(targets, new TabletPenButtonReleaseEvent(state, Button)); 26 } 27 } 28}