Build upon work from previous commit. Commented out because the code is currently not very useful

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8567 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-05-14 00:42:57 +00:00
parent 15cdaf04bd
commit 5f812437b9
2 changed files with 37 additions and 4 deletions

View File

@ -251,7 +251,7 @@ EventPropagation OptionsScreenInput::filterActions(PlayerAction action, int devi
Input::InputType type, int playerId)
{
/*
if (type == Input::IT_STICKMOTION || type == Input::IT_STICKBUTTON)
if (value > Input::MAX_VALUE*2/3 && (type == Input::IT_STICKMOTION || type == Input::IT_STICKBUTTON))
{
GamePadDevice* gamepad = input_manager->getDeviceList()->getGamePadFromIrrID(deviceID);
if (gamepad != NULL && gamepad->getConfiguration() != NULL)
@ -275,13 +275,41 @@ EventPropagation OptionsScreenInput::filterActions(PlayerAction action, int devi
internal_name = gpname.str();
}
}
if (internal_name.size() > 0)
{
devices->markItemRed(internal_name.c_str(), value > Input::MAX_VALUE*2/3);
devices->markItemRed(internal_name.c_str());
m_highlights[internal_name] = 0.25f;
}
}
}
*/
*/
return EVENT_LET;
}
// -----------------------------------------------------------------------------
void OptionsScreenInput::onUpdate(float dt, irr::video::IVideoDriver* drv)
{
/*
std::map<std::string, float>::iterator it;
for (it = m_highlights.begin(); it != m_highlights.end();)
{
it->second -= dt;
if (it->second < 0.0f)
{
ListWidget* devices = this->getWidget<ListWidget>("devices");
assert(devices != NULL);
devices->markItemRed(it->first.c_str(), false);
m_highlights.erase(it++);
}
else
{
it++;
}
}
*/
//m_highlights[internal_name]
}

View File

@ -20,6 +20,7 @@
#define __HEADER_OPTIONS_SCREEN_INPUT_HPP__
#include <string>
//#include <map>
#include "irrlicht.h"
#include "guiengine/screen.hpp"
@ -44,6 +45,8 @@ class OptionsScreenInput : public GUIEngine::Screen, public GUIEngine::ScreenSin
irr::gui::STKModifiedSpriteBank* m_icon_bank;
// std::map<std::string, float> m_highlights;
public:
friend class GUIEngine::ScreenSingleton<OptionsScreenInput>;
@ -71,6 +74,8 @@ public:
const unsigned int value,
Input::InputType type,
int playerId);
virtual void onUpdate(float dt, irr::video::IVideoDriver* drv);
};
#endif