@@ -271,6 +271,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
{ "CycleProductionBuildingsKey", "Cycle production facilities" },
|
||||
|
||||
{ "ToggleStatusBarsKey", "Toggle status bars" },
|
||||
{ "TogglePixelDoubleKey", "Toggle pixel doubling" },
|
||||
};
|
||||
|
||||
var unitHotkeys = new Dictionary<string, string>()
|
||||
|
||||
@@ -65,8 +65,11 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
if (key == ks.ToggleStatusBarsKey)
|
||||
return ToggleStatusBars();
|
||||
|
||||
if (key == ks.TogglePixelDoubleKey)
|
||||
return TogglePixelDouble();
|
||||
|
||||
// Put all functions that aren't unit-specific before this line!
|
||||
if (!world.Selection.Actors.Any())
|
||||
if (!world.Selection.Actors.Any())
|
||||
return false;
|
||||
|
||||
if (key == ks.AttackMoveKey)
|
||||
@@ -253,5 +256,12 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
Game.Settings.Game.AlwaysShowStatusBars ^= true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TogglePixelDouble()
|
||||
{
|
||||
Game.Settings.Graphics.PixelDouble ^= true;
|
||||
worldRenderer.Viewport.Zoom = Game.Settings.Graphics.PixelDouble ? 2 : 1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user