Tied in my recent Android flick gesture addition to a Scroll() function. GameState now has a virtual function OnScroll() call that, by default is a no-op; each game state can choose to override how to respond to flick gestures. I've added one such override in the Deck Editor so that a flick up/down acts like the psp button up/down for scrolling between color filters.

This commit is contained in:
wrenczes@gmail.com
2011-06-15 09:52:11 +00:00
parent e1dc1afa74
commit 741f662bb0
9 changed files with 298 additions and 240 deletions

View File

@@ -89,6 +89,8 @@ public:
virtual void Pause();
virtual void Resume();
virtual void OnScroll(int inXVelocity, int inYVelocity);
void LoadGameStates();
void SetNextState(int state);
void DoTransition(int trans, int tostate, float dur = -1, bool animonly = false);

View File

@@ -55,6 +55,10 @@ public:
virtual void Start(){}
virtual void End(){}
virtual void OnScroll(int inXVelocity, int inYVelocity)
{
}
virtual void Update(float dt) = 0;
virtual void Render() = 0;

View File

@@ -141,6 +141,8 @@ public:
int loadDeck(int deckid);
void LoadDeckStatistics(int deckId);
void OnScroll(int inXVelocity, int inYVelocity);
void buildEditorMenu();
virtual void ButtonPressed(int controllerId, int controlId);
};