A game framework written with osu! in mind.
at master 31 lines 947 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.IO; 5using osu.Framework.Allocation; 6using osu.Framework.Bindables; 7using osu.Framework.Input.Events; 8 9namespace osu.Framework.Graphics.UserInterface 10{ 11 public abstract class DirectorySelectorDirectory : DirectorySelectorItem 12 { 13 protected readonly DirectoryInfo Directory; 14 protected override string FallbackName => Directory.Name; 15 16 [Resolved] 17 private Bindable<DirectoryInfo> currentDirectory { get; set; } 18 19 protected DirectorySelectorDirectory(DirectoryInfo directory, string displayName = null) 20 : base(displayName) 21 { 22 Directory = directory; 23 } 24 25 protected override bool OnClick(ClickEvent e) 26 { 27 currentDirectory.Value = Directory; 28 return true; 29 } 30 } 31}