2023-12-31 17:58:29 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2024-10-07 10:04:14 +00:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2023-12-31 17:58:29 +00:00
|
|
|
using osu.Game.Rulesets.Edit;
|
2024-09-23 14:36:11 +00:00
|
|
|
using osu.Game.Rulesets.Edit.Tools;
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints;
|
2023-12-31 17:58:29 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit
|
|
|
|
{
|
2024-09-23 14:36:11 +00:00
|
|
|
public partial class GridFromPointsTool : CompositionTool
|
2023-12-31 17:58:29 +00:00
|
|
|
{
|
2024-09-23 14:36:11 +00:00
|
|
|
public GridFromPointsTool()
|
2024-10-07 17:09:09 +00:00
|
|
|
: base("Grid")
|
2023-12-31 17:58:29 +00:00
|
|
|
{
|
2024-10-07 10:04:14 +00:00
|
|
|
TooltipText = """
|
|
|
|
Left click to set the origin.
|
|
|
|
Left click again to set the spacing and rotation.
|
|
|
|
Right click to only set the origin.
|
|
|
|
Click and drag to set the origin, spacing and rotation.
|
|
|
|
""";
|
2023-12-31 17:58:29 +00:00
|
|
|
}
|
|
|
|
|
2024-10-07 17:09:21 +00:00
|
|
|
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.Solid.DraftingCompass };
|
2024-10-07 10:04:14 +00:00
|
|
|
|
2024-09-23 14:36:11 +00:00
|
|
|
public override PlacementBlueprint CreatePlacementBlueprint() => new GridPlacementBlueprint();
|
2023-12-31 17:58:29 +00:00
|
|
|
}
|
|
|
|
}
|