1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 10:42:55 +08:00

ColumnStyle -> ColumnPosition.

This commit is contained in:
smoogipooo 2017-05-04 14:46:10 +09:00
parent 5574a8770b
commit a2bdd020e5
4 changed files with 14 additions and 14 deletions

View File

@ -38,11 +38,11 @@ namespace osu.Desktop.VisualTests.Tests
AddStep("Trigger keys down", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyDown)); AddStep("Trigger keys down", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyDown));
AddStep("Trigger keys up", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyUp)); AddStep("Trigger keys up", () => ((ManiaPlayfield)Children.First()).Columns.Children.ForEach(triggerKeyUp));
AddStep("Left special style", () => ((ManiaPlayfield)Children.First()).SpecialColumnStyle = SpecialColumnStyle.Left); AddStep("Left special style", () => ((ManiaPlayfield)Children.First()).SpecialColumnPosition = SpecialColumnPosition.Left);
AddStep("Right special style", () => ((ManiaPlayfield)Children.First()).SpecialColumnStyle = SpecialColumnStyle.Right); AddStep("Right special style", () => ((ManiaPlayfield)Children.First()).SpecialColumnPosition = SpecialColumnPosition.Right);
} }
AddStep("Normal special style", () => ((ManiaPlayfield)Children.First()).SpecialColumnStyle = SpecialColumnStyle.Normal); AddStep("Normal special style", () => ((ManiaPlayfield)Children.First()).SpecialColumnPosition = SpecialColumnPosition.Normal);
} }
private void triggerKeyDown(Column column) private void triggerKeyDown(Column column)

View File

@ -27,18 +27,18 @@ namespace osu.Game.Rulesets.Mania.UI
/// </summary> /// </summary>
private static readonly Key[] default_keys = { Key.A, Key.S, Key.D, Key.F, Key.J, Key.K, Key.L, Key.Semicolon }; private static readonly Key[] default_keys = { Key.A, Key.S, Key.D, Key.F, Key.J, Key.K, Key.L, Key.Semicolon };
private SpecialColumnStyle specialColumnStyle; private SpecialColumnPosition specialColumnPosition;
/// <summary> /// <summary>
/// The style to use for the special column. /// The style to use for the special column.
/// </summary> /// </summary>
public SpecialColumnStyle SpecialColumnStyle public SpecialColumnPosition SpecialColumnPosition
{ {
get { return specialColumnStyle; } get { return specialColumnPosition; }
set set
{ {
if (specialColumnStyle == value) if (specialColumnPosition == value)
return; return;
specialColumnStyle = value; specialColumnPosition = value;
if (!IsLoaded) if (!IsLoaded)
return; return;
@ -158,14 +158,14 @@ namespace osu.Game.Rulesets.Mania.UI
/// <returns>Whether the column is a special column.</returns> /// <returns>Whether the column is a special column.</returns>
private bool isSpecialColumn(int column) private bool isSpecialColumn(int column)
{ {
switch (SpecialColumnStyle) switch (SpecialColumnPosition)
{ {
default: default:
case SpecialColumnStyle.Normal: case SpecialColumnPosition.Normal:
return columnCount % 2 == 1 && column == columnCount / 2; return columnCount % 2 == 1 && column == columnCount / 2;
case SpecialColumnStyle.Left: case SpecialColumnPosition.Left:
return column == 0; return column == 0;
case SpecialColumnStyle.Right: case SpecialColumnPosition.Right:
return column == columnCount - 1; return column == columnCount - 1;
} }
} }

View File

@ -3,7 +3,7 @@
namespace osu.Game.Rulesets.Mania.UI namespace osu.Game.Rulesets.Mania.UI
{ {
public enum SpecialColumnStyle public enum SpecialColumnPosition
{ {
/// <summary> /// <summary>
/// The special column will lie in the center of the columns. /// The special column will lie in the center of the columns.

View File

@ -61,7 +61,7 @@
<Compile Include="UI\ManiaPlayfield.cs" /> <Compile Include="UI\ManiaPlayfield.cs" />
<Compile Include="ManiaRuleset.cs" /> <Compile Include="ManiaRuleset.cs" />
<Compile Include="Mods\ManiaMod.cs" /> <Compile Include="Mods\ManiaMod.cs" />
<Compile Include="UI\SpecialColumnStyle.cs" /> <Compile Include="UI\SpecialColumnPosition.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj"> <ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">