1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 20:07:26 +08:00
osu-lazer/osu.Game/Overlays/Mods/AssistedSection.cs

224 lines
6.6 KiB
C#
Raw Normal View History

2017-02-17 04:05:03 +08:00
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
2017-02-17 07:00:18 +08:00
using OpenTK.Input;
2017-02-17 04:05:03 +08:00
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Modes;
2017-02-23 00:23:46 +08:00
using osu.Game.Overlays.Mods;
2017-02-17 04:05:03 +08:00
namespace osu.Game
{
public class AssistedSection : ModSection
{
private ModButton relaxButton;
public ModButton RelaxButton
{
get
2017-02-23 00:22:29 +08:00
{
return relaxButton;
}
}
private ModButton autopilotButton;
public ModButton AutopilotButton
{
get
{
return autopilotButton;
}
}
private ModButton targetPracticeButton;
public ModButton TargetPracticeButton
{
get
{
return targetPracticeButton;
}
}
private ModButton spunOutButton;
public ModButton SpunOutButton
{
get
{
return spunOutButton;
}
}
private ModButton autoplayCinemaButton;
public ModButton AutoplayCinemaButton
{
get
{
return autoplayCinemaButton;
}
}
private ModButton keyButton;
public ModButton KeyButton
{
get
{
return keyButton;
}
}
private ModButton coopButton;
public ModButton CoopButton
{
get
{
return coopButton;
}
}
private ModButton randomButton;
public ModButton RandomButton
{
get
{
return randomButton;
}
}
2017-02-17 04:05:03 +08:00
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Blue;
SelectedColour = colours.BlueLight;
2017-02-17 04:05:03 +08:00
}
public AssistedSection(PlayMode mode)
2017-02-17 04:05:03 +08:00
{
Header = @"Assisted";
switch (mode)
2017-02-17 04:05:03 +08:00
{
case PlayMode.Osu:
Buttons = new ModButton[]
2017-02-17 04:05:03 +08:00
{
relaxButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.Z,
Mods = new Mod[]
{
new ModRelax(),
},
},
autopilotButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.X,
Mods = new Mod[]
{
new ModAutopilot(),
},
},
targetPracticeButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.C,
Mods = new Mod[]
{
new ModTarget(),
},
},
spunOutButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.V,
Mods = new Mod[]
{
new ModSpunOut(),
},
},
autoplayCinemaButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.B,
Mods = new Mod[]
{
new ModAutoplay(),
new ModCinema(),
},
},
};
break;
case PlayMode.Taiko:
case PlayMode.Catch:
Buttons = new ModButton[]
2017-02-17 04:05:03 +08:00
{
relaxButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.Z,
Mods = new Mod[]
{
new ModRelax(),
},
},
autoplayCinemaButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.X,
Mods = new Mod[]
{
new ModAutoplay(),
new ModCinema(),
},
},
};
break;
case PlayMode.Mania:
Buttons = new ModButton[]
2017-02-17 04:05:03 +08:00
{
keyButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.Z,
Mods = new Mod[]
{
new ModKey4(),
new ModKey5(),
new ModKey6(),
new ModKey7(),
new ModKey8(),
new ModKey9(),
new ModKey1(),
new ModKey2(),
new ModKey3(),
},
},
coopButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.X,
Mods = new Mod[]
{
new ModKeyCoop(),
},
},
randomButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.C,
Mods = new Mod[]
{
new ModRandom(),
},
},
autoplayCinemaButton = new ModButton
{
2017-02-17 07:00:18 +08:00
ToggleKey = Key.V,
Mods = new Mod[]
{
new ModAutoplay(),
new ModCinema(),
},
},
};
break;
default:
throw new NotSupportedException();
}
2017-02-17 04:05:03 +08:00
}
}
}