diff Framework/Widgets/TestWorldSceneWidget.cpp @ 327:8716176ff7f0 am-2

added support for arrow keys
author am@osimis.io
date Tue, 16 Oct 2018 15:25:21 +0200
parents 300d8b8c48b3
children 885f0a5eaa49
line wrap: on
line diff
--- a/Framework/Widgets/TestWorldSceneWidget.cpp	Tue Oct 16 12:57:38 2018 +0200
+++ b/Framework/Widgets/TestWorldSceneWidget.cpp	Tue Oct 16 15:25:21 2018 +0200
@@ -13,7 +13,7 @@
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Affero General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Affero General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  **/
@@ -81,20 +81,21 @@
       }
 
       virtual void KeyPressed(WorldSceneWidget& widget,
-                              char key,
+                              KeyboardKeys key,
+                              char keyChar,
                               KeyboardModifiers modifiers,
                               IStatusBar* statusBar)
       {
         if (statusBar)
         {
-          statusBar->SetMessage("Key pressed: \"" + std::string(1, key) + "\"");
+          statusBar->SetMessage("Key pressed: \"" + std::string(1, keyChar) + "\"");
         }
       }
     };
 
 
     bool TestWorldSceneWidget::RenderScene(CairoContext& context,
-                                           const ViewportGeometry& view) 
+                                           const ViewportGeometry& view)
     {
       cairo_t* cr = context.GetObject();