Add hotkeys for viewport bookmarks.
This commit is contained in:
@@ -450,17 +450,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{ "CycleStatusBarsKey", "Cycle status bars display" },
|
{ "CycleStatusBarsKey", "Cycle status bars display" },
|
||||||
{ "TogglePixelDoubleKey", "Toggle pixel doubling" },
|
{ "TogglePixelDoubleKey", "Toggle pixel doubling" },
|
||||||
{ "ToggleMuteKey", "Toggle audio mute" },
|
{ "ToggleMuteKey", "Toggle audio mute" },
|
||||||
{ "TogglePlayerStanceColorsKey", "Toggle player stance colors" },
|
{ "TogglePlayerStanceColorsKey", "Toggle player stance colors" }
|
||||||
|
|
||||||
{ "MapScrollUp", "Map scroll up" },
|
|
||||||
{ "MapScrollDown", "Map scroll down" },
|
|
||||||
{ "MapScrollLeft", "Map scroll left" },
|
|
||||||
{ "MapScrollRight", "Map scroll right" },
|
|
||||||
|
|
||||||
{ "MapPushTop", "Map push to top" },
|
|
||||||
{ "MapPushBottom", "Map push to bottom" },
|
|
||||||
{ "MapPushLeftEdge", "Map push to left edge" },
|
|
||||||
{ "MapPushRightEdge", "Map push to right edge" }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
|
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
|
||||||
@@ -471,6 +461,29 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
BindHotkeyPref(kv, ks, globalTemplate, hotkeyList);
|
BindHotkeyPref(kv, ks, globalTemplate, hotkeyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Viewport
|
||||||
|
{
|
||||||
|
var hotkeys = new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "MapScrollUp", "Scroll up" },
|
||||||
|
{ "MapScrollDown", "Scroll down" },
|
||||||
|
{ "MapScrollLeft", "Scroll left" },
|
||||||
|
{ "MapScrollRight", "Scroll right" },
|
||||||
|
|
||||||
|
{ "MapPushTop", "Jump to top edge" },
|
||||||
|
{ "MapPushBottom", "Jump to bottom edge" },
|
||||||
|
{ "MapPushLeftEdge", "Jump to left edge" },
|
||||||
|
{ "MapPushRightEdge", "Jump to right edge" }
|
||||||
|
};
|
||||||
|
|
||||||
|
var header = ScrollItemWidget.Setup(hotkeyHeader, returnTrue, doNothing);
|
||||||
|
header.Get<LabelWidget>("LABEL").GetText = () => "Viewport Commands";
|
||||||
|
hotkeyList.AddChild(header);
|
||||||
|
|
||||||
|
foreach (var kv in hotkeys)
|
||||||
|
BindHotkeyPref(kv, ks, globalTemplate, hotkeyList);
|
||||||
|
}
|
||||||
|
|
||||||
// Observer
|
// Observer
|
||||||
{
|
{
|
||||||
var hotkeys = new Dictionary<string, string>()
|
var hotkeys = new Dictionary<string, string>()
|
||||||
|
|||||||
Reference in New Issue
Block a user