[iagno] Add help overlay.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Add help overlay.
- Date: Sat, 3 Aug 2019 09:05:02 +0000 (UTC)
commit 9bcd68b3cef8394b3632baca1cea74dd01b810c7
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Jul 29 13:22:34 2019 +0200
Add help overlay.
data/iagno.gresource.xml | 3 ++
data/ui/help-overlay.ui | 138 +++++++++++++++++++++++++++++++++++++++++++++++
src/iagno.vala | 1 +
3 files changed, 142 insertions(+)
---
diff --git a/data/iagno.gresource.xml b/data/iagno.gresource.xml
index 7d329b5..4c4b563 100644
--- a/data/iagno.gresource.xml
+++ b/data/iagno.gresource.xml
@@ -14,4 +14,7 @@
<file preprocess="xml-stripblanks" compressed="true" alias="overlayed-list.ui"
ui/overlayed-list.ui</file>
<file preprocess="xml-stripblanks" compressed="true" alias="registry-placeholder.ui"
ui/registry-placeholder.ui</file>
</gresource>
+ <gresource prefix="/org/gnome/Reversi/gtk">
+ <file preprocess="xml-stripblanks" alias="help-overlay.ui">ui/help-overlay.ui</file>
+ </gresource>
</gresources>
diff --git a/data/ui/help-overlay.ui b/data/ui/help-overlay.ui
new file mode 100644
index 0000000..206ff7c
--- /dev/null
+++ b/data/ui/help-overlay.ui
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This file is part of GNOME Reversi (also known as Iagno).
+
+ Copyright 2019 Arnaud Bonatti
+
+ GNOME Reversi is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ GNOME Reversi is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNOME Reversi. If not, see <https://www.gnu.org/licenses/>.
+-->
+<interface domain="iagno">
+ <requires lib="gtk+" version="3.12"/>
+ <object class="GtkShortcutsWindow" id="help_overlay">
+ <child>
+ <object class="GtkShortcutsSection">
+ <property name="visible">True</property>
+ <property name="max-height">8</property>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">During game
selection</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Start new game</property>
+ <property name="accelerator"><Primary><Shift>n</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Go back</property>
+ <property name="accelerator">Escape</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Play with keyboard</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Select where to
play</property>
+ <property name="accelerator">Left Right Up Down</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Select the given
row</property>
+ <property name="accelerator">1...8</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Select the given
column</property>
+ <property name="accelerator">a...h</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Play on selected
tile</property>
+ <property name="accelerator">Return space</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">During a game</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">New game</property>
+ <property name="accelerator"><Primary>n</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Undo last move</property>
+ <property name="accelerator"><Primary>z</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsGroup">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Generic</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Keyboard
shortcuts</property>
+ <property name="accelerator"><Primary>question <Primary>F1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Help</property>
+ <property name="accelerator">F1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">About</property>
+ <property name="accelerator"><Shift>F1</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes" context="shortcut window">Quit</property>
+ <property name="accelerator"><Primary>q</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/src/iagno.vala b/src/iagno.vala
index 333875e..54dfd96 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -287,6 +287,7 @@ private class Iagno : Gtk.Application, BaseApplication
start_now,
GameWindowFlags.SHOW_START_BUTTON
| GameWindowFlags.HAS_SOUND
+ | GameWindowFlags.SHORTCUTS
| GameWindowFlags.SHOW_HELP
| GameWindowFlags.SHOW_UNDO,
(Box) new_game_screen,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]