Extended Scroll() and OnScroll() to also take in magnitude as one of its parameters. magnitude is currently used in the deck editor to figure out how many cards to rotate around per swipe as function of velocity and the number of cards displayed on the screen.
fixed a compiler warning in SimplePopup in the constructor declaration ===DECK Editor changes === Added two touch buttons , one for "Sell Card", the other to switch between Deck and Collection. changed swipe Left/Right to rotate card collection; removing the previous action which was to swap between deck/collection viewing Note: GameStateDeckViewer isn't a JGuiController so can't leverage off the mButtons vector. Thus, the buttons have to be handled by this class separately. (setButtonState, userPressedButton)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "DeckStats.h"
|
||||
#include "WDataSrc.h"
|
||||
#include "WGui.h"
|
||||
#include "InteractiveButton.h"
|
||||
|
||||
#define NO_USER_ACTIVITY_HELP_DELAY 10
|
||||
#define NO_USER_ACTIVITY_SHOWCARD_DELAY 0.1
|
||||
@@ -95,6 +96,8 @@ private:
|
||||
int lastPos;
|
||||
int lastTotal;
|
||||
int mSelected;
|
||||
|
||||
InteractiveButton *toggleDeckButton, *sellCardButton;
|
||||
|
||||
WGuiFilters * filterMenu;
|
||||
WSrcDeckViewer * source;
|
||||
@@ -118,6 +121,10 @@ private:
|
||||
void saveDeck(); //Saves the deck and additional necessary information
|
||||
void saveAsAIDeck(string deckName); // saves deck as an AI Deck
|
||||
int getCurrentPos();
|
||||
void sellCard();
|
||||
void setButtonState(bool state);
|
||||
bool userPressedButton();
|
||||
|
||||
pair<float, float> cardsCoordinates[CARDS_DISPLAYED];
|
||||
|
||||
public:
|
||||
@@ -143,7 +150,7 @@ public:
|
||||
int loadDeck(int deckid);
|
||||
void LoadDeckStatistics(int deckId);
|
||||
|
||||
void OnScroll(int inXVelocity, int inYVelocity);
|
||||
void OnScroll(int inXVelocity, int inYVelocity, int magnitude = 0);
|
||||
|
||||
void buildEditorMenu();
|
||||
virtual void ButtonPressed(int controllerId, int controlId);
|
||||
|
||||
Reference in New Issue
Block a user