i think i broke game input in my previous commit. i'm trying to limit the damage here... don't think i got it right yet
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3257 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -128,8 +128,13 @@ RaceGUI::handle(GameAction ga, int value)
|
||||
// Note that the kartaction enum value and their representatives in
|
||||
// gameaction enum have the same order (Otherwise the stuff below would
|
||||
// not work ...)!
|
||||
|
||||
std::cout << "--- ga = " << ga << "\n";
|
||||
|
||||
if (ga >= GA_FIRST_KARTACTION && ga <= GA_LAST_KARTACTION)
|
||||
{
|
||||
std::cout << "--- yay passing to kart\n";
|
||||
|
||||
// 'Pulls down' the gameaction value to make them multiples of the
|
||||
// kartaction values.
|
||||
int ka = ga - GA_FIRST_KARTACTION;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "items/projectile_manager.hpp"
|
||||
#include "karts/kart_properties_manager.hpp"
|
||||
#include "gui/font.hpp"
|
||||
#include "gui/race_gui.hpp"
|
||||
|
||||
#define DEADZONE_MOUSE 150
|
||||
#define DEADZONE_MOUSE_SENSE 200
|
||||
@@ -329,8 +330,8 @@ void SDLDriver::input(Input::InputType type, int id0, int id1, int id2,
|
||||
int value)
|
||||
{
|
||||
// TODO - menus handle SDL input
|
||||
/*
|
||||
BaseGUI* menu = menu_manager->getCurrentMenu();
|
||||
RaceGUI* menu = getRaceGUI(); // FIXME - input is handled in menu class??
|
||||
//BaseGUI* menu = menu_manager->getCurrentMenu();
|
||||
|
||||
GameAction ga = m_action_map->getEntry(type, id0, id1, id2);
|
||||
|
||||
@@ -388,14 +389,15 @@ void SDLDriver::input(Input::InputType type, int id0, int id1, int id2,
|
||||
int x, y;
|
||||
SDL_GetMouseState( &x, &y );
|
||||
y = SDL_GetVideoSurface()->h - y;
|
||||
menu->inputPointer( x, y );
|
||||
//menu->inputPointer( x, y );
|
||||
}
|
||||
|
||||
std::cout << "--- passing event to menu\n";
|
||||
|
||||
// Lets the currently active menu handle the GameAction.
|
||||
menu->handle(ga, value);
|
||||
}
|
||||
} // menu!=NULL
|
||||
*/
|
||||
} // input
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user