mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 02:32:59 +08:00
Update UI cases where repeat should not be handled
This commit is contained in:
parent
5fb5e0035c
commit
3de8125eac
@ -90,6 +90,9 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
public virtual bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
|
@ -60,6 +60,9 @@ namespace osu.Game.Graphics
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.TakeScreenshot:
|
||||
|
@ -64,6 +64,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
|
@ -75,6 +75,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public virtual bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (!HasFocus) return false;
|
||||
|
||||
if (e.Action == GlobalAction.Back)
|
||||
|
@ -58,6 +58,9 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (State.Value == Visibility.Hidden)
|
||||
return false;
|
||||
|
||||
|
@ -1007,6 +1007,9 @@ namespace osu.Game
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (introScreen == null) return false;
|
||||
|
||||
switch (e.Action)
|
||||
|
@ -94,6 +94,9 @@ namespace osu.Game.Overlays
|
||||
|
||||
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
|
@ -102,6 +102,9 @@ namespace osu.Game.Overlays
|
||||
|
||||
public override bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Select:
|
||||
|
@ -32,6 +32,9 @@ namespace osu.Game.Overlays.Music
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (beatmap.Disabled)
|
||||
return false;
|
||||
|
||||
|
@ -220,6 +220,9 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
|
@ -21,6 +21,9 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (e.Action == GlobalAction.Back)
|
||||
{
|
||||
BeginConfirm();
|
||||
|
@ -134,6 +134,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (SelectedRoom.Value != Room)
|
||||
return false;
|
||||
|
||||
|
@ -19,6 +19,9 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<PlatformAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (!Enabled.Value)
|
||||
return false;
|
||||
|
||||
|
@ -65,6 +65,9 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Select:
|
||||
|
@ -208,6 +208,9 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
|
@ -283,6 +283,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.HoldForHUD:
|
||||
|
@ -12,6 +12,9 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (e.Action != GlobalAction.QuickExit) return false;
|
||||
|
||||
BeginConfirm();
|
||||
|
@ -12,6 +12,9 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (e.Action != GlobalAction.QuickRetry) return false;
|
||||
|
||||
BeginConfirm();
|
||||
|
@ -146,6 +146,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.SkipCutscene:
|
||||
|
@ -330,6 +330,9 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case GlobalAction.Select:
|
||||
|
@ -821,6 +821,9 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public virtual bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
if (e.Repeat)
|
||||
return false;
|
||||
|
||||
if (!this.IsCurrentScreen()) return false;
|
||||
|
||||
switch (e.Action)
|
||||
|
Loading…
Reference in New Issue
Block a user