Skip to content

Commit f4dfa55

Browse files
Merge pull request #130 from C7-Game/DefaultZoomAndGrid
Default zoom and grid
2 parents d3b8051 + 88a3a2c commit f4dfa55

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

C7/Game.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public override void _Ready()
6868
Player = GetNode<KinematicBody2D>("KinematicBody2D");
6969
//TODO: What was this supposed to do? It throws errors and occasinally causes crashes now, because _OnViewportSizeChanged doesn't exist
7070
// GetTree().Root.Connect("size_changed", this, "_OnViewportSizeChanged");
71-
mapView.cameraZoom = (float)0.3;
71+
mapView.cameraZoom = (float)1.0;
72+
mapView.gridLayer.visible = false;
7273
// If later recreating scene, the component may already exist, hence try/catch
7374
try{
7475
ComponentManager.Instance.AddComponent(new TurnCounterComponent());
@@ -407,9 +408,7 @@ public override void _UnhandledInput(InputEvent @event)
407408
}
408409
}
409410
}
410-
// I key toggles the grid. This should be CTRL+G to match the original game but that key combination gets intercepted by the
411-
// unit action handler.
412-
else if (eventKey.Scancode == (int)Godot.KeyList.I)
411+
else if (eventKey.Scancode == (int)Godot.KeyList.G && eventKey.Control)
413412
{
414413
mapView.gridLayer.visible = ! mapView.gridLayer.visible;
415414
}

C7/UIElements/UnitButtons/UnitButtons.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public override void _UnhandledInput(InputEvent @event) {
108108
foreach (UnitControlButton button in buttonMap.Values)
109109
{
110110
if (button.Visible == true) {
111-
if (eventKey.Scancode == button.shortcutKey) {
111+
if (eventKey.Scancode == button.shortcutKey && !eventKey.Shift && !eventKey.Command && !eventKey.Control && !eventKey.Alt) {
112112
this.onButtonPressed(button.key);
113113
GetTree().SetInputAsHandled();
114114
}

0 commit comments

Comments
 (0)