Skip to content

Commit

Permalink
Fix conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Game4all committed Oct 30, 2022
2 parents 18d4dc5 + 5d0d69c commit 0088abf
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>netcoreapp6.0</TargetFramework>
<PackAsTool>true</PackAsTool>

<!-- Make sure start same folder .NET Core CLI and Visual Studio -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using NUnit.Framework;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Gamebosu.UI.Input;
using osu.Game.Rulesets.Gamebosu.UI.Screens.Selection;
using osu.Game.Tests.Visual;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Gamebosu/GamebosuRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using osu.Game.Rulesets.Gamebosu.Graphics;
using osu.Game.Rulesets.Gamebosu.UI;
using osu.Game.Rulesets.Gamebosu.UI.Configuration;
using osu.Game.Rulesets.Gamebosu.UI.Input;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Gamebosu/Replays/GamebosuReplayFrame.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// gamebosu! ruleset. Copyright Lucas ARRIESSE aka Game4all. Licensed under GPLv3.
// See LICENSE at root of repo for more information on licensing.

using osu.Game.Rulesets.Gamebosu.UI.Input;
using osu.Game.Rulesets.Replays;
using System.Collections.Generic;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Gamebosu/UI/DrawableGamebosuRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public DrawableGamebosuRuleset(GamebosuRuleset ruleset, IBeatmap beatmap, IReadO

public override DrawableHitObject<GamebosuHitObject> CreateDrawableRepresentation(GamebosuHitObject h) => new DrawableGamebosuHitObject(h);

protected override PassThroughInputManager CreateInputManager() => new GamebosuInputManager(Ruleset?.RulesetInfo);
protected override PassThroughInputManager CreateInputManager() => new PassThroughInputManager();

public override bool AllowGameplayOverlays => false;
}
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Gamebosu/UI/Gameboy/DrawableGameboy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using osu.Framework.Logging;
using osu.Game.Rulesets.Gamebosu.Audio;
using osu.Game.Rulesets.Gamebosu.Configuration;
using osu.Game.Rulesets.Gamebosu.UI.Input;
using System.Collections.Generic;
using System.Linq;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
// gamebosu! ruleset. Copyright Lucas ARRIESSE aka Game4all. Licensed under GPLv3.
// See LICENSE at root of repo for more information on licensing.
using System.ComponentModel;

using osu.Framework.Input.Bindings;
using osu.Game.Rulesets.UI;
using System.ComponentModel;

namespace osu.Game.Rulesets.Gamebosu
namespace osu.Game.Rulesets.Gamebosu.UI.Input
{
public class GamebosuInputManager : RulesetInputManager<GamebosuAction>
{
public GamebosuInputManager(RulesetInfo ruleset)
: base(ruleset, 0, SimultaneousBindingMode.Unique)
{
}
}

public enum GamebosuAction
{
[Description("DPad Right")]
Expand Down Expand Up @@ -47,4 +34,4 @@ public enum GamebosuAction
[Description("Decrement clock rate")]
ButtonDecrementClockRate
}
}
}
46 changes: 46 additions & 0 deletions osu.Game.Rulesets.Gamebosu/UI/Input/GamebosuInputManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// gamebosu! ruleset. Copyright Lucas ARRIESSE aka Game4all. Licensed under GPLv3.
// See LICENSE at root of repo for more information on licensing.

using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Game.Input;
using osu.Game.Input.Bindings;
using System.Linq;

namespace osu.Game.Rulesets.Gamebosu.UI.Input
{
public class GamebosuInputManager : PassThroughInputManager
{
private readonly RulesetKeyBindingContainer keybindingContainer;

protected override Container<Drawable> Content => content;

private readonly Container content;

public GamebosuInputManager(RulesetInfo ruleset)
{
InternalChild = (keybindingContainer = new RulesetKeyBindingContainer(ruleset, 0, SimultaneousBindingMode.All).WithChild(content = new Container
{
RelativeSizeAxes = Axes.Both
}));
}

private class RulesetKeyBindingContainer : DatabasedKeyBindingContainer<GamebosuAction>
{
protected override bool HandleRepeats => false;

public RulesetKeyBindingContainer(RulesetInfo ruleset, int variant, SimultaneousBindingMode unique)
: base(ruleset, variant, unique, KeyCombinationMatchingMode.Any)
{
}

protected override void ReloadMappings()
{
base.ReloadMappings();
KeyBindings = KeyBindings.Where((IKeyBinding b) => RealmKeyBindingStore.CheckValidForGameplay(b.KeyCombination)).ToList();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using osu.Framework.Utils;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Rulesets.Gamebosu.UI.Input;
using osuTK.Graphics;
using System;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using osu.Game.Audio.Effects;
using osu.Game.Rulesets.Gamebosu.Configuration;
using osu.Game.Rulesets.Gamebosu.IO;
using osu.Game.Rulesets.Gamebosu.UI.Input;

namespace osu.Game.Rulesets.Gamebosu.UI.Screens
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using osu.Framework.Graphics;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Gamebosu.UI.Input;
using System;

namespace osu.Game.Rulesets.Gamebosu.UI.Screens.Gameplay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Gamebosu.UI.Input;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down

0 comments on commit 0088abf

Please sign in to comment.