mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 19:52:57 +08:00
Minify LegacyReplayFrame
This commit is contained in:
parent
cf42d5bbd5
commit
19911193cf
@ -15,34 +15,10 @@ namespace osu.Game.Rulesets.Replays.Legacy
|
|||||||
public bool MouseLeft => MouseLeft1 || MouseLeft2;
|
public bool MouseLeft => MouseLeft1 || MouseLeft2;
|
||||||
public bool MouseRight => MouseRight1 || MouseRight2;
|
public bool MouseRight => MouseRight1 || MouseRight2;
|
||||||
|
|
||||||
public bool MouseLeft1
|
public bool MouseLeft1 => (ButtonState & ReplayButtonState.Left1) > 0;
|
||||||
{
|
public bool MouseRight1 => (ButtonState & ReplayButtonState.Right1) > 0;
|
||||||
get { return (ButtonState & ReplayButtonState.Left1) > 0; }
|
public bool MouseLeft2 => (ButtonState & ReplayButtonState.Left2) > 0;
|
||||||
set { setButtonState(ReplayButtonState.Left1, value); }
|
public bool MouseRight2 => (ButtonState & ReplayButtonState.Right2) > 0;
|
||||||
}
|
|
||||||
public bool MouseRight1
|
|
||||||
{
|
|
||||||
get { return (ButtonState & ReplayButtonState.Right1) > 0; }
|
|
||||||
set { setButtonState(ReplayButtonState.Right1, value); }
|
|
||||||
}
|
|
||||||
public bool MouseLeft2
|
|
||||||
{
|
|
||||||
get { return (ButtonState & ReplayButtonState.Left2) > 0; }
|
|
||||||
set { setButtonState(ReplayButtonState.Left2, value); }
|
|
||||||
}
|
|
||||||
public bool MouseRight2
|
|
||||||
{
|
|
||||||
get { return (ButtonState & ReplayButtonState.Right2) > 0; }
|
|
||||||
set { setButtonState(ReplayButtonState.Right2, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setButtonState(ReplayButtonState singleButton, bool pressed)
|
|
||||||
{
|
|
||||||
if (pressed)
|
|
||||||
ButtonState |= singleButton;
|
|
||||||
else
|
|
||||||
ButtonState &= ~singleButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ReplayButtonState ButtonState;
|
public ReplayButtonState ButtonState;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user