From 1f362f88b0b5e5af2a94d17d997affd9e5d99cb7 Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 24 May 2009 01:28:56 +0000 Subject: [PATCH] fixed issue with ribbons when not using mouse + improved looks of input config screen git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3538 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/gui/options_input.stkgui | 27 ++++++++++++++++++--------- src/gui/options_screen.cpp | 5 +++-- src/gui/widget.cpp | 4 ++-- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/data/gui/options_input.stkgui b/data/gui/options_input.stkgui index 57dd56e67..ccbea62cc 100644 --- a/data/gui/options_input.stkgui +++ b/data/gui/options_input.stkgui @@ -17,7 +17,8 @@
@@ -25,56 +26,64 @@
diff --git a/src/gui/options_screen.cpp b/src/gui/options_screen.cpp index 417cad504..8803e97b8 100644 --- a/src/gui/options_screen.cpp +++ b/src/gui/options_screen.cpp @@ -274,8 +274,9 @@ namespace StateManager { if(name == "devices") { - RibbonGridWidget* devices = dynamic_cast(widget); - + RibbonGridWidget* devices = getCurrentScreen()->getWidget("devices"); + assert(devices != NULL); + const std::string& selection = devices->getSelectionName(); if( selection.find("gamepad") != std::string::npos ) { diff --git a/src/gui/widget.cpp b/src/gui/widget.cpp index 9bdb3f778..f3e6e856a 100644 --- a/src/gui/widget.cpp +++ b/src/gui/widget.cpp @@ -969,7 +969,7 @@ bool RibbonGridWidget::rightPressed() updateLabel(); propagateSelection(); } - return false; + return true; } // ----------------------------------------------------------------------------- bool RibbonGridWidget::leftPressed() @@ -982,7 +982,7 @@ bool RibbonGridWidget::leftPressed() updateLabel(); propagateSelection(); } - return false; + return true; } // ----------------------------------------------------------------------------- bool RibbonGridWidget::transmitEvent(Widget* w, std::string& originator)