Added MusicControllerLogic, now we can handle audio buttons anywhere in the game.

This commit is contained in:
szabkel
2016-04-16 22:40:53 +02:00
parent 189b94f3a0
commit 1b4a42d3d9
12 changed files with 127 additions and 1 deletions

View File

@@ -560,6 +560,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic
BindHotkeyPref(kv, ks, developerTemplate, hotkeyList);
}
// Music
{
var hotkeys = new Dictionary<string, string>()
{
{ "NextTrack", "Next" },
{ "PreviousTrack", "Previous" },
{ "StopMusic", "Stop" },
{ "PauseMusic", "Pause or Resume" }
};
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
header.Get<LabelWidget>("LABEL").GetText = () => "Music commands";
hotkeyList.AddChild(header);
foreach (var kv in hotkeys)
BindHotkeyPref(kv, ks, developerTemplate, hotkeyList);
}
return () => { };
}