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
This commit is contained in:
auria 2009-05-24 01:28:56 +00:00
parent cc2c62e024
commit 1f362f88b0
3 changed files with 23 additions and 13 deletions

View File

@ -17,7 +17,8 @@
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Accelerate" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_up" proportion="2" height="100%" text="[none]"/>
<button id="binding_up" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
@ -25,56 +26,64 @@
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Brake" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_down" proportion="2" height="100%" text="[none]"/>
<button id="binding_down" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Left" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_left" proportion="2" height="100%" text="[none]"/>
<button id="binding_left" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Right" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_right" proportion="2" height="100%" text="[none]"/>
<button id="binding_right" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Fire" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_fire" proportion="2" height="100%" text="[none]"/>
<button id="binding_fire" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center" >
<label proportion="2" height="100%" text="Nitro" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_nitro" proportion="2" height="100%" text="[none]"/>
<button id="binding_nitro" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Sharp Turn" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_drift" proportion="2" height="100%" text="[none]"/>
<button id="binding_drift" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Rescue" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_rescue" proportion="2" height="100%" text="[none]"/>
<button id="binding_rescue" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer height="5" width="10"/>
<div width="85%" proportion="1" layout="horizontal-row" align="center">
<label proportion="2" height="100%" text="Look Back" text_align="right"/>
<spacer proportion="1" height="100%" />
<button id="binding_look_back" proportion="2" height="100%" text="[none]"/>
<button id="binding_look_back" proportion="3" height="100%" text="[none]"/>
<spacer proportion="1" height="100%" />
</div>
<spacer width="50" height="10" />

View File

@ -274,8 +274,9 @@ namespace StateManager
{
if(name == "devices")
{
RibbonGridWidget* devices = dynamic_cast<RibbonGridWidget*>(widget);
RibbonGridWidget* devices = getCurrentScreen()->getWidget<RibbonGridWidget>("devices");
assert(devices != NULL);
const std::string& selection = devices->getSelectionName();
if( selection.find("gamepad") != std::string::npos )
{

View File

@ -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)