mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Remove live realm bindings for now
This commit is contained in:
parent
a4b66bec2e
commit
b9a9174168
@ -159,28 +159,6 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private RealmKeyBinding realmKeyBinding;
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
if (Hotkey == null) return;
|
|
||||||
|
|
||||||
realmKeyBinding = realmFactory.Context.All<RealmKeyBinding>().FirstOrDefault(rkb => rkb.RulesetID == null && rkb.ActionInt == (int)Hotkey.Value);
|
|
||||||
|
|
||||||
if (realmKeyBinding != null)
|
|
||||||
{
|
|
||||||
realmKeyBinding.PropertyChanged += (sender, args) =>
|
|
||||||
{
|
|
||||||
if (args.PropertyName == nameof(realmKeyBinding.KeyCombinationString))
|
|
||||||
updateKeyBindingTooltip();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
updateKeyBindingTooltip();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e) => true;
|
protected override bool OnMouseDown(MouseDownEvent e) => true;
|
||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
@ -196,6 +174,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
HoverBackground.FadeIn(200);
|
HoverBackground.FadeIn(200);
|
||||||
tooltipContainer.FadeIn(100);
|
tooltipContainer.FadeIn(100);
|
||||||
|
|
||||||
return base.OnHover(e);
|
return base.OnHover(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,6 +201,20 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
private void updateKeyBindingTooltip()
|
private void updateKeyBindingTooltip()
|
||||||
{
|
{
|
||||||
|
if (Hotkey == null) return;
|
||||||
|
|
||||||
|
var realmKeyBinding = realmFactory.Context.All<RealmKeyBinding>().FirstOrDefault(rkb => rkb.RulesetID == null && rkb.ActionInt == (int)Hotkey.Value);
|
||||||
|
|
||||||
|
// TODO: temporarily disabled to avoid crashes when querying after ExecutionState is changed.
|
||||||
|
// if (realmKeyBinding != null)
|
||||||
|
// {
|
||||||
|
// realmKeyBinding.PropertyChanged += (sender, args) =>
|
||||||
|
// {
|
||||||
|
// if (args.PropertyName == nameof(realmKeyBinding.KeyCombinationString))
|
||||||
|
// updateKeyBindingTooltip();
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
||||||
if (realmKeyBinding != null)
|
if (realmKeyBinding != null)
|
||||||
{
|
{
|
||||||
var keyBindingString = realmKeyBinding.KeyCombination.ReadableString();
|
var keyBindingString = realmKeyBinding.KeyCombination.ReadableString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user