Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ppy
GitHub Repository: ppy/osu
Path: blob/master/osu.Game.Rulesets.Osu/Edit/GridFromPointsTool.cs
2264 views
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Rulesets.Osu.Edit.Blueprints;

namespace osu.Game.Rulesets.Osu.Edit
{
    public partial class GridFromPointsTool : CompositionTool
    {
        public GridFromPointsTool()
            : base("Grid")
        {
            TooltipText = """
                          Left click to set the origin.
                          Left click again to set the spacing and rotation.
                          Right click to reset to default.
                          Click and drag to set the origin, spacing and rotation.
                          """;
        }

        public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.Solid.DraftingCompass };

        public override PlacementBlueprint CreatePlacementBlueprint() => new GridPlacementBlueprint();
    }
}