Bind wireframe mode to the home key
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12841 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "states_screens/state_manager.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
|
||||
#include <ISceneManager.h>
|
||||
#include <ISceneNode.h>
|
||||
|
||||
#include <map>
|
||||
@@ -281,6 +282,17 @@ void InputManager::handleStaticAction(int key, int value)
|
||||
UserConfigParams::m_profiler_enabled =
|
||||
!UserConfigParams::m_profiler_enabled;
|
||||
break;
|
||||
case KEY_HOME:
|
||||
if (value)
|
||||
{
|
||||
video::SOverrideMaterial &mat =
|
||||
irr_driver->getVideoDriver()->getOverrideMaterial();
|
||||
|
||||
mat.Material.Wireframe ^= 1;
|
||||
mat.EnableFlags = video::EMF_WIREFRAME;
|
||||
mat.EnablePasses = scene::ESNRP_SOLID | scene::ESNRP_TRANSPARENT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // switch
|
||||
|
||||
Reference in New Issue
Block a user