Commit 37eeb473 authored by Robert Roth's avatar Robert Roth

Added in-game keyboard shortcuts to help overlay (#34)

parent 440543ad
Pipeline #55971 passed with stage
in 3 minutes and 1 second
......@@ -9,6 +9,7 @@
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes" context="shortcut window">Window and games</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
......@@ -53,6 +54,40 @@
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes" context="shortcut window">In-game</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Up Down Left Right</property>
<property name="title" translatable="yes" context="shortcut window">Move the keyboard cursor in the game field</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">u j h k</property>
<property name="title" translatable="yes" context="shortcut window">Move the keyboard cursor in the game field</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">space</property>
<property name="title" translatable="yes" context="shortcut window">Reveal field</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;space</property>
<property name="title" translatable="yes" context="shortcut window">Toggle field flag state between normal and flagged (and question, if enabled)</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
......
......@@ -452,12 +452,12 @@ public class MinefieldView : Gtk.Grid
break;
case Gdk.Key.Right:
case Gdk.Key.l:
case Gdk.Key.k:
x++;
break;
case Gdk.Key.Up:
case Gdk.Key.k:
case Gdk.Key.u:
y--;
break;
......@@ -467,7 +467,6 @@ public class MinefieldView : Gtk.Grid
break;
case Gdk.Key.space:
case Gdk.Key.Return:
if (keyboard_cursor.is_set)
{
selected.is_set = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment