Fixed focus orb problem when master player uses gamepad

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4252 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-12-06 15:48:04 +00:00
parent 957fc9281b
commit 1e4ede71ff
2 changed files with 9 additions and 5 deletions

View File

@ -13,6 +13,7 @@ difficulty_*.png icons, released under Creative-Commons BY-SA 3, By Conso (Const
Okolaks font by Gluk, released under Open Font License
title_font, by Marianne Gagnon (Auria), released under CC-BY-SA 3+
====

View File

@ -240,9 +240,10 @@ EventPropagation RibbonWidget::rightPressed(const int playerID)
if (m_ribbon_type == RIBBON_COMBO)
{
const int mousePlayerID = input_manager->getPlayerKeyboardID();
if (playerID == mousePlayerID)
const int MASTER_PLAYER = 0; // FIXME: unclean
if (playerID == mousePlayerID || playerID == MASTER_PLAYER)
{
m_mouse_focus = m_children.get(m_selection[mousePlayerID]);
m_mouse_focus = m_children.get(m_selection[playerID]);
}
}
@ -274,9 +275,10 @@ EventPropagation RibbonWidget::leftPressed(const int playerID)
if (m_ribbon_type == RIBBON_COMBO)
{
const int mousePlayerID = input_manager->getPlayerKeyboardID();
if (playerID == mousePlayerID)
const int MASTER_PLAYER = 0; // FIXME: unclean
if (playerID == mousePlayerID || playerID == MASTER_PLAYER)
{
m_mouse_focus = m_children.get(m_selection[mousePlayerID]);
m_mouse_focus = m_children.get(m_selection[playerID]);
}
}
@ -300,7 +302,8 @@ EventPropagation RibbonWidget::focused(const int playerID)
if (m_ribbon_type == RIBBON_COMBO)
{
const int mousePlayerID = input_manager->getPlayerKeyboardID();
if (m_mouse_focus == NULL && m_selection[playerID] != -1 && playerID == mousePlayerID)
const int MASTER_PLAYER = 0; // FIXME: unclean
if (m_mouse_focus == NULL && m_selection[playerID] != -1 && (playerID == mousePlayerID || playerID == MASTER_PLAYER))
{
m_mouse_focus = m_children.get(m_selection[playerID]);
}