vs 2010 update for deck editor changes as well as SDL update

This commit is contained in:
techdragon.nguyen@gmail.com
2012-01-26 14:54:17 +00:00
parent 85451f69ee
commit a438c9135e
2 changed files with 8 additions and 6 deletions
+4 -4
View File
@@ -110,10 +110,10 @@ public:
virtual void Update(float dt); virtual void Update(float dt);
virtual bool CheckUserInput(JButton key); virtual bool CheckUserInput(JButton key);
void Add(JGuiObject* ctrl, bool isButton = false); virtual void Add(JGuiObject* ctrl, bool isButton = false);
void RemoveAt(int i, bool isButton = false); virtual void RemoveAt(int i, bool isButton = false);
void Remove(int id); virtual void Remove(int id);
void Remove(JGuiObject* ctrl); virtual void Remove(JGuiObject* ctrl);
void SetActionButton(JButton button); void SetActionButton(JButton button);
void SetStyle(int style); void SetStyle(int style);
+4 -2
View File
@@ -17,7 +17,7 @@
#include "DebugRoutines.h" #include "DebugRoutines.h"
#include <stdexcept> #include <stdexcept>
#include <iostream> #include <iostream>
#include <math.h>
#if (defined FORCE_GLES) #if (defined FORCE_GLES)
#undef GL_ES_VERSION_2_0 #undef GL_ES_VERSION_2_0
@@ -253,7 +253,9 @@ public:
case SDL_JOYBALLMOTION: case SDL_JOYBALLMOTION:
DebugTrace("Flick gesture detected, x: " << Event->jball.xrel << ", y: " << Event->jball.yrel); DebugTrace("Flick gesture detected, x: " << Event->jball.xrel << ", y: " << Event->jball.yrel);
g_engine->Scroll(Event->jball.xrel, Event->jball.yrel); int magnitude = static_cast<int>(sqrt( powf( Event->jball.xrel, 2) + powf( Event->jball.yrel, 2)));
g_engine->Scroll(Event->jball.xrel, Event->jball.yrel, magnitude);
break; break;
} }
} }