1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 15:27:24 +08:00

Rename diagonal scale variable and update xmldoc

This commit is contained in:
Dean Herbert 2023-11-10 17:51:30 +09:00
parent f25489cc7b
commit 35e11c7c63
No known key found for this signature in database
5 changed files with 17 additions and 12 deletions

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Osu.Edit
SelectionBox.CanFlipX = SelectionBox.CanScaleX = quad.Width > 0;
SelectionBox.CanFlipY = SelectionBox.CanScaleY = quad.Height > 0;
SelectionBox.CanScaleProportionally = SelectionBox.CanScaleX && SelectionBox.CanScaleY;
SelectionBox.CanScaleDiagonally = SelectionBox.CanScaleX && SelectionBox.CanScaleY;
SelectionBox.CanReverse = EditorBeatmap.SelectedHitObjects.Count > 1 || EditorBeatmap.SelectedHitObjects.Any(s => s is Slider);
}

View File

@ -47,7 +47,7 @@ namespace osu.Game.Tests.Visual.Editing
CanScaleX = true,
CanScaleY = true,
CanScaleProportionally = true,
CanScaleDiagonally = true,
CanFlipX = true,
CanFlipY = true,

View File

@ -221,7 +221,7 @@ namespace osu.Game.Overlays.SkinEditor
SelectionBox.CanScaleX = allSelectedSupportManualSizing(Axes.X);
SelectionBox.CanScaleY = allSelectedSupportManualSizing(Axes.Y);
SelectionBox.CanScaleProportionally = true;
SelectionBox.CanScaleDiagonally = true;
SelectionBox.CanFlipX = true;
SelectionBox.CanFlipY = true;
SelectionBox.CanReverse = false;

View File

@ -60,7 +60,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
private bool canScaleX;
/// <summary>
/// Whether horizontal scaling support should be enabled.
/// Whether horizontal scaling (from the left or right edge) support should be enabled.
/// </summary>
public bool CanScaleX
{
@ -77,7 +77,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
private bool canScaleY;
/// <summary>
/// Whether vertical scaling support should be enabled.
/// Whether vertical scaling (from the top or bottom edge) support should be enabled.
/// </summary>
public bool CanScaleY
{
@ -91,19 +91,23 @@ namespace osu.Game.Screens.Edit.Compose.Components
}
}
private bool canScaleProportionally;
private bool canScaleDiagonally;
/// <summary>
/// Whether vertical scaling support should be enabled.
/// Whether diagonal scaling (from a corner) support should be enabled.
/// </summary>
public bool CanScaleProportionally
/// <remarks>
/// There are some cases where we only want to allow proportional resizing, and not allow
/// one or both explicit directions of scale.
/// </remarks>
public bool CanScaleDiagonally
{
get => canScaleProportionally;
get => canScaleDiagonally;
set
{
if (canScaleProportionally == value) return;
if (canScaleDiagonally == value) return;
canScaleProportionally = value;
canScaleDiagonally = value;
recreate();
}
}
@ -262,7 +266,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
};
if (CanScaleX) addXScaleComponents();
if (CanScaleProportionally) addFullScaleComponents();
if (CanScaleDiagonally) addFullScaleComponents();
if (CanScaleY) addYScaleComponents();
if (CanFlipX) addXFlipComponents();
if (CanFlipY) addYFlipComponents();

View File

@ -823,6 +823,7 @@ See the LICENCE file in the repository root for full licence text.&#xD;
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=System_002ENumerics_002E_002A/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=System_002ESecurity_002ECryptography_002ERSA/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=TagLib_002EMpeg4_002EBox/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002EDaemon_002ESettings_002EMigration_002ESwaWarningsModeSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>