Skip to content

Commit

Permalink
Merge branch 'master' into taiko-namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jan 22, 2019
2 parents 0573c1c + a9dd41e commit 635046a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 22 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -12,6 +12,7 @@ We are accepting bug reports (please report with as much detail as possible). Fe

- A desktop platform with the [.NET Core SDK 2.2](https://www.microsoft.com/net/learn/get-started) or higher installed.
- When working with the codebase, we recommend using an IDE with intellisense and syntax highlighting, such as [Visual Studio 2017+](https://visualstudio.microsoft.com/vs/), [Jetbrains Rider](https://www.jetbrains.com/rider/) or [Visual Studio Code](https://code.visualstudio.com/).
- Note that there are **[additional requirements for Windows 7 and Windows 8.1](https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore2x)** which you may need to manually install if your operating system is not up-to-date.

# Running osu!

Expand Down
10 changes: 10 additions & 0 deletions osu.Game/Overlays/Settings/Sections/SkinSection.cs
Expand Up @@ -52,6 +52,16 @@ private void load(OsuConfigManager config, SkinManager skins)
LabelText = "Adjust gameplay cursor size based on current beatmap",
Bindable = config.GetBindable<bool>(OsuSetting.AutoCursorSize)
},
new SettingsCheckbox
{
LabelText = "Beatmap skins",
Bindable = config.GetBindable<bool>(OsuSetting.BeatmapSkins)
},
new SettingsCheckbox
{
LabelText = "Beatmap hitsounds",
Bindable = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds)
},
};

skins.ItemAdded += itemAdded;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/HUD/PlayerSettingsOverlay.cs
Expand Up @@ -50,7 +50,7 @@ public PlayerSettingsOverlay()
protected override void PopOut() => this.FadeOut(fade_duration);

//We want to handle keyboard inputs all the time in order to trigger ToggleVisibility() when not visible
public override bool HandleNonPositionalInput => true;
public override bool PropagateNonPositionalInputSubTree => true;

protected override bool OnKeyDown(KeyDownEvent e)
{
Expand Down
49 changes: 29 additions & 20 deletions osu.Game/Screens/Play/HUDOverlay.cs
Expand Up @@ -50,15 +50,25 @@ public HUDOverlay(ScoreProcessor scoreProcessor, RulesetContainer rulesetContain
RelativeSizeAxes = Axes.Both,
AlwaysPresent = true, // The hud may be hidden but certain elements may need to still be updated
Children = new Drawable[] {
ComboCounter = CreateComboCounter(),
ScoreCounter = CreateScoreCounter(),
AccuracyCounter = CreateAccuracyCounter(),
new Container {
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Y = 30,
AutoSizeAxes = Axes.Both,
AutoSizeDuration = 200,
AutoSizeEasing = Easing.Out,
Children = new Drawable[] {
AccuracyCounter = CreateAccuracyCounter(),
ScoreCounter = CreateScoreCounter(),
ComboCounter = CreateComboCounter(),
},
},
HealthDisplay = CreateHealthDisplay(),
Progress = CreateProgress(),
ModDisplay = CreateModsContainer(),
PlayerSettingsOverlay = CreatePlayerSettingsOverlay(),
}
},
PlayerSettingsOverlay = CreatePlayerSettingsOverlay(),
new FillFlowContainer
{
Anchor = Anchor.BottomRight,
Expand Down Expand Up @@ -159,20 +169,27 @@ protected override bool OnKeyDown(KeyDownEvent e)

protected virtual RollingCounter<double> CreateAccuracyCounter() => new PercentageCounter
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopRight,
Position = new Vector2(0, 35),
TextSize = 20,
Margin = new MarginPadding { Right = 140 },
BypassAutoSizeAxes = Axes.X,
Anchor = Anchor.TopLeft,
Origin = Anchor.TopRight,
Margin = new MarginPadding { Top = 5, Right = 20 },
};

protected virtual RollingCounter<int> CreateComboCounter() => new SimpleComboCounter
protected virtual ScoreCounter CreateScoreCounter() => new ScoreCounter(6)
{
TextSize = 40,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopLeft,
Position = new Vector2(0, 35),
Margin = new MarginPadding { Left = 140 },
Origin = Anchor.TopCentre,
};

protected virtual RollingCounter<int> CreateComboCounter() => new SimpleComboCounter
{
TextSize = 20,
BypassAutoSizeAxes = Axes.X,
Anchor = Anchor.TopRight,
Origin = Anchor.TopLeft,
Margin = new MarginPadding { Top = 5, Left = 20 },
};

protected virtual HealthDisplay CreateHealthDisplay() => new StandardHealthDisplay
Expand All @@ -191,14 +208,6 @@ protected override bool OnKeyDown(KeyDownEvent e)
AudioClock = offsetClock
};

protected virtual ScoreCounter CreateScoreCounter() => new ScoreCounter(6)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
TextSize = 40,
Position = new Vector2(0, 30),
};

protected virtual SongProgress CreateProgress() => new SongProgress
{
Anchor = Anchor.BottomLeft,
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs
Expand Up @@ -38,7 +38,7 @@ public VisualSettings()
},
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboards" },
beatmapSkinsToggle = new PlayerCheckbox { LabelText = "Beatmap skins" },
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hit sounds" }
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hitsounds" }
};
}

Expand Down

0 comments on commit 635046a

Please sign in to comment.