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:
@@ -15,6 +15,7 @@
|
||||
#include "WResourceManager.h"
|
||||
#include "WFont.h"
|
||||
|
||||
const int kButtonHeight = 60;
|
||||
|
||||
InteractiveButton::InteractiveButton(JGuiController* _parent, int id, int fontId, string text, float x, float y, JButton actionKey, bool hasFocus, bool autoTranslate) :
|
||||
SimpleButton( _parent, id, fontId, text, x, y, hasFocus, autoTranslate)
|
||||
@@ -35,7 +36,7 @@ void InteractiveButton::checkUserClick()
|
||||
setIsSelectionValid(false);
|
||||
int buttonImageWidth = static_cast<int>(GetWidth());
|
||||
int x2 = static_cast<int>(getX()), y2 = static_cast<int>(getY() + mYOffset);
|
||||
int buttonHeight = 50;
|
||||
int buttonHeight = kButtonHeight;
|
||||
if ( (x1 >= x2) && (x1 <= (x2 + buttonImageWidth)) && (y1 >= y2) && (y1 < (y2 + buttonHeight)))
|
||||
setIsSelectionValid( true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user