Skip to content

Commit

Permalink
Create non-functional hitsound table with header icons
Browse files Browse the repository at this point in the history
  • Loading branch information
kstefanowicz committed Aug 2, 2024
1 parent 5c93bfa commit c754eb0
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 7 deletions.
154 changes: 148 additions & 6 deletions osu.Game/Screens/Edit/Sounds/HitsoundsTable.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,157 @@
// 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.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


using osuTK;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Pooling;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.UserInterfaceV2;

Check failure on line 12 in osu.Game/Screens/Edit/Sounds/HitsoundsTable.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

Check failure on line 12 in osu.Game/Screens/Edit/Sounds/HitsoundsTable.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using osu.Game.Graphics;

namespace osu.Game.Screens.Edit.Sounds
{
internal class HitsoundsTable
public partial class HitsoundsTable : CompositeDrawable
{

public const float COLUMN_WIDTH = 70;
public const float COLUMN_GAP = 10;
public const float ROW_HEIGHT = 25;
public const float ROW_HORIZONTAL_PADDING = 20;
public const int TEXT_SIZE = 14;

[BackgroundDependencyLoader]
private void load(OverlayColourProvider colours)
{
InternalChildren = new Drawable[]
{
new Box
{
Colour = colours.Background3,
RelativeSizeAxes = Axes.Both,
},
new GridContainer
{
RelativeSizeAxes = Axes.Both,
Margin = new MarginPadding {Left = 20, Top = 10},
ColumnDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize)
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize)
},
Content = new[]
{
new Drawable[] {
new TableHeaderText("Bank")
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft
},
new SpriteIcon
{
Size = new Vector2(ROW_HEIGHT),
Icon = FontAwesome.Solid.DotCircle,
Margin = new MarginPadding {Left = (COLUMN_WIDTH + COLUMN_GAP) }
},
new SpriteIcon
{
Size = new Vector2(ROW_HEIGHT),
Icon = OsuIcon.EditorWhistle,
Margin = new MarginPadding {Left = 2 * (COLUMN_WIDTH + COLUMN_GAP) }
},
new SpriteIcon
{
Size = new Vector2(ROW_HEIGHT),
Icon = OsuIcon.EditorFinish,
Margin = new MarginPadding {Left = 3 * (COLUMN_WIDTH + COLUMN_GAP) }
},
new SpriteIcon
{
Size = new Vector2(ROW_HEIGHT),
Icon = FontAwesome.Solid.Hands,
Margin = new MarginPadding {Left = 4 * (COLUMN_WIDTH + COLUMN_GAP) }
},
},
new Drawable[]
{
new OsuSpriteText()
{
Text = "Normal",
Margin = new MarginPadding {Top = ROW_HEIGHT },
RelativeSizeAxes = Axes.Both
},
new OsuSpriteText()
{
Text = "Play normal-hitnormal",
RelativeSizeAxes = Axes.Both
},
new OsuSpriteText()
{
Text = "Play normal-hitwhistle",
Size = new Vector2(40, 20),
RelativeSizeAxes = Axes.Both

},
new OsuSpriteText()
{
Text = "Play normal-hitfinish",
Size = new Vector2(40, 20),
RelativeSizeAxes = Axes.Both

},
new OsuSpriteText()
{
Text = "Play normal-hitclap",
Size = new Vector2(40, 20),
RelativeSizeAxes = Axes.Both

}
},
new Drawable[]
{
new OsuSpriteText()
{
Text = "Soft",
Margin = new MarginPadding {Top = 2 * ROW_HEIGHT }
}
},
new Drawable[]
{
new OsuSpriteText()
{
Text = "Drum",
Margin = new MarginPadding {Top = 3 * ROW_HEIGHT }
}
}
}
}
};

Check failure on line 138 in osu.Game/Screens/Edit/Sounds/HitsoundsTable.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 138 in osu.Game/Screens/Edit/Sounds/HitsoundsTable.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
}
}

public class HitsoundBank
{
public enum DefaultBanks
{
Normal,
Soft,
Drum
}
}

public partial class DrawableHitsoundBank : PoolableDrawable
{

}
}

2 changes: 1 addition & 1 deletion osu.Game/Screens/Edit/Sounds/SoundsScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public SoundsScreen()
{
new Drawable[]
{
new HitsoundsTable();
new HitsoundsTable()
},
}
};
Expand Down

0 comments on commit c754eb0

Please sign in to comment.