mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
More Clean UP
This commit is contained in:
parent
9b0e1c26a3
commit
23a7045eef
@ -13,7 +13,6 @@ namespace osu.Game.Configuration
|
||||
protected override void InitialiseDefaults()
|
||||
{
|
||||
// UI/selection defaults
|
||||
|
||||
Set(OsuSetting.Ruleset, 0, 0, int.MaxValue);
|
||||
Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details);
|
||||
|
||||
@ -25,7 +24,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
|
||||
|
||||
// Online settings
|
||||
|
||||
Set(OsuSetting.Username, string.Empty);
|
||||
Set(OsuSetting.Token, string.Empty);
|
||||
|
||||
@ -40,14 +38,12 @@ namespace osu.Game.Configuration
|
||||
};
|
||||
|
||||
// Audio
|
||||
|
||||
Set(OsuSetting.MenuVoice, true);
|
||||
Set(OsuSetting.MenuMusic, true);
|
||||
|
||||
Set(OsuSetting.AudioOffset, 0, -500.0, 500.0);
|
||||
|
||||
// Input
|
||||
|
||||
Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2);
|
||||
Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2);
|
||||
Set(OsuSetting.AutoCursorSize, false);
|
||||
@ -56,7 +52,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.MouseDisableWheel, false);
|
||||
|
||||
// Graphics
|
||||
|
||||
Set(OsuSetting.ShowFpsDisplay, false);
|
||||
|
||||
Set(OsuSetting.MenuParallax, true);
|
||||
@ -65,7 +60,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.SnakingOutSliders, true);
|
||||
|
||||
// Gameplay
|
||||
|
||||
Set(OsuSetting.DimLevel, 0.3, 0, 1);
|
||||
|
||||
Set(OsuSetting.ShowInterface, true);
|
||||
@ -75,7 +69,6 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.PlaybackSpeed, 1.0, 0.5f, 2);
|
||||
|
||||
// Update
|
||||
|
||||
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
Top = padding * 2,
|
||||
Bottom = padding * 2,
|
||||
Left = ChatLine.LEFT_PADDING + padding * 2,
|
||||
Left = ChatLine.LEFT_PADDING + (padding * 2),
|
||||
Right = padding * 2,
|
||||
},
|
||||
Children = new Drawable[]
|
||||
@ -202,7 +202,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
Trace.Assert(state.Mouse.PositionMouseDown != null);
|
||||
|
||||
chatHeight.Value = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y;
|
||||
chatHeight.Value = startDragChatHeight - ((state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y);
|
||||
return base.OnDrag(state);
|
||||
}
|
||||
|
||||
@ -367,7 +367,6 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
careChannels.Add(channel);
|
||||
channelTabs.AddItem(channel);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ namespace osu.Game.Screens.Select
|
||||
foreach (BeatmapPanel panel in group.BeatmapPanels)
|
||||
{
|
||||
if (panel == selectedPanel)
|
||||
selectedY = currentY + panel.DrawHeight / 2 - DrawHeight / 2;
|
||||
selectedY = ((currentY + (panel.DrawHeight / 2)) - (DrawHeight / 2));
|
||||
|
||||
panel.MoveToX(-50, 500, EasingTypes.OutExpo);
|
||||
|
||||
@ -477,7 +477,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
// The radius of the circle the carousel moves on.
|
||||
const float circle_radius = 3;
|
||||
double discriminant = Math.Max(0, circle_radius * circle_radius - dist * dist);
|
||||
double discriminant = Math.Max(0, (circle_radius * circle_radius) - (dist * dist));
|
||||
float x = (circle_radius - (float)Math.Sqrt(discriminant)) * halfHeight;
|
||||
|
||||
return 125 + x;
|
||||
@ -493,8 +493,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
var height = p.IsPresent ? p.DrawHeight : 0;
|
||||
|
||||
float panelDrawY = p.Position.Y - Current + height / 2;
|
||||
float dist = Math.Abs(1f - panelDrawY / halfHeight);
|
||||
float panelDrawY = (p.Position.Y - Current) + (height / 2);
|
||||
float dist = Math.Abs(1f - (panelDrawY / halfHeight));
|
||||
|
||||
// Setting the origin position serves as an additive position on top of potential
|
||||
// local transformation we may want to apply (e.g. when a panel gets selected, we
|
||||
@ -504,7 +504,7 @@ namespace osu.Game.Screens.Select
|
||||
// We are applying a multiplicative alpha (which is internally done by nesting an
|
||||
// additional container and setting that container's alpha) such that we can
|
||||
// layer transformations on top, with a similar reasoning to the previous comment.
|
||||
p.SetMultiplicativeAlpha(MathHelper.Clamp(1.75f - 1.5f * dist, 0, 1));
|
||||
p.SetMultiplicativeAlpha(MathHelper.Clamp(1.75f - (1.5f * dist), 0, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user