@@ -169,6 +169,8 @@ namespace OpenRA
|
|||||||
|
|
||||||
public Hotkey ObserverCombinedView = new Hotkey(Keycode.MINUS, Modifiers.None);
|
public Hotkey ObserverCombinedView = new Hotkey(Keycode.MINUS, Modifiers.None);
|
||||||
public Hotkey ObserverWorldView = new Hotkey(Keycode.EQUALS, Modifiers.None);
|
public Hotkey ObserverWorldView = new Hotkey(Keycode.EQUALS, Modifiers.None);
|
||||||
|
|
||||||
|
public Hotkey TogglePixelDoubleKey = new Hotkey(Keycode.PERIOD, Modifiers.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IrcSettings
|
public class IrcSettings
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{ "CycleProductionBuildingsKey", "Cycle production facilities" },
|
{ "CycleProductionBuildingsKey", "Cycle production facilities" },
|
||||||
|
|
||||||
{ "ToggleStatusBarsKey", "Toggle status bars" },
|
{ "ToggleStatusBarsKey", "Toggle status bars" },
|
||||||
|
{ "TogglePixelDoubleKey", "Toggle pixel doubling" },
|
||||||
};
|
};
|
||||||
|
|
||||||
var unitHotkeys = new Dictionary<string, string>()
|
var unitHotkeys = new Dictionary<string, string>()
|
||||||
|
|||||||
@@ -65,8 +65,11 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
if (key == ks.ToggleStatusBarsKey)
|
if (key == ks.ToggleStatusBarsKey)
|
||||||
return ToggleStatusBars();
|
return ToggleStatusBars();
|
||||||
|
|
||||||
|
if (key == ks.TogglePixelDoubleKey)
|
||||||
|
return TogglePixelDouble();
|
||||||
|
|
||||||
// Put all functions that aren't unit-specific before this line!
|
// Put all functions that aren't unit-specific before this line!
|
||||||
if (!world.Selection.Actors.Any())
|
if (!world.Selection.Actors.Any())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (key == ks.AttackMoveKey)
|
if (key == ks.AttackMoveKey)
|
||||||
@@ -253,5 +256,12 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
Game.Settings.Game.AlwaysShowStatusBars ^= true;
|
Game.Settings.Game.AlwaysShowStatusBars ^= true;
|
||||||
return 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