A game framework written with osu! in mind.
at master 44 lines 1.5 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 osu.Framework.Allocation; 5using osu.Framework.Graphics; 6using osu.Framework.Graphics.Containers; 7using osu.Framework.Graphics.UserInterface; 8using osu.Framework.Platform; 9using osuTK; 10 11namespace osu.Framework.Tests.Visual.Platform 12{ 13 public class TestSceneExternalLinks : FrameworkTestScene 14 { 15 [Resolved] 16 private GameHost host { get; set; } 17 18 public TestSceneExternalLinks() 19 { 20 Child = new FillFlowContainer 21 { 22 RelativeSizeAxes = Axes.Both, 23 Direction = FillDirection.Vertical, 24 Spacing = new Vector2(20), 25 Padding = new MarginPadding(10), 26 Children = new Drawable[] 27 { 28 new BasicButton 29 { 30 Action = () => host.OpenUrlExternally("https://osu.ppy.sh"), 31 Size = new Vector2(150, 30), 32 Text = "Open osu! site", 33 }, 34 new BasicButton 35 { 36 Action = () => host.OpenUrlExternally("this is a bad link that shouldn't crash the app"), 37 Size = new Vector2(150, 30), 38 Text = "Open bad link", 39 }, 40 } 41 }; 42 } 43 } 44}