Added buttons to display menus, new token macros.
Newer Android devices dont have phisical buttons, so added buttons to display menus that have the same behaviour of pressing the back button. Bug fixes in primitives. Created macros for Eldrazi Scion and Eldrazi Spawn tokens.
This commit is contained in:
@@ -55,6 +55,7 @@ GameStateDeckViewer::GameStateDeckViewer(GameApp* parent) :
|
||||
sellCardButton = NEW InteractiveButton(NULL, kSellCardActionId, Fonts::MAIN_FONT, "Sell Card", (SCREEN_WIDTH_F/ 2) - 125, SCREEN_HEIGHT_F - 20, JGE_BTN_SEC);
|
||||
sb_cmd_dng_Button = NEW InteractiveButton(NULL, kSBActionId, Fonts::MAIN_FONT, "View SB", (SCREEN_WIDTH_F/ 2) - 35, SCREEN_HEIGHT_F - 20, JGE_BTN_CTRL);
|
||||
filterButton = NEW InteractiveButton(NULL, kFilterButtonId, Fonts::MAIN_FONT, "Filter", (SCREEN_WIDTH_F - 116), SCREEN_HEIGHT_F - 20, JGE_BTN_SOUND);
|
||||
menuButton = NEW InteractiveButton(NULL, kMenuButtonId, Fonts::MAIN_FONT, "Menu", (SCREEN_WIDTH_F - 76), SCREEN_HEIGHT_F - 20, JGE_BTN_MENU);
|
||||
//TODO: Check if that button is available:
|
||||
toggleViewButton = NEW InteractiveButton(NULL, kSwitchViewButton, Fonts::MAIN_FONT, "Grid", (SCREEN_WIDTH_F/ 2) + 50, SCREEN_HEIGHT_F - 20, JGE_BTN_MAX);
|
||||
toggleUpButton = NEW InteractiveButton(NULL, kToggleUpButton, Fonts::MAIN_FONT, "UP", 10, 25, JGE_BTN_DOWN);
|
||||
@@ -578,6 +579,7 @@ bool GameStateDeckViewer::userPressedButton()
|
||||
|| (sb_cmd_dng_Button->ButtonPressed())
|
||||
|| (statsPrevButton->ButtonPressed())
|
||||
|| (filterButton->ButtonPressed())
|
||||
|| (menuButton->ButtonPressed())
|
||||
|| (toggleViewButton->ButtonPressed())
|
||||
|| (toggleUpButton->ButtonPressed())
|
||||
|| (toggleDownButton->ButtonPressed())
|
||||
@@ -593,6 +595,7 @@ void GameStateDeckViewer::setButtonState(bool state)
|
||||
sb_cmd_dng_Button->setIsSelectionValid(state);
|
||||
statsPrevButton->setIsSelectionValid(state);
|
||||
filterButton->setIsSelectionValid(state);
|
||||
menuButton->setIsSelectionValid(state);
|
||||
toggleViewButton->setIsSelectionValid(state);
|
||||
toggleUpButton->setIsSelectionValid(state);
|
||||
toggleDownButton->setIsSelectionValid(state);
|
||||
@@ -609,6 +612,7 @@ void GameStateDeckViewer::RenderButtons()
|
||||
sb_cmd_dng_Button->Render();
|
||||
if(mView->deck() != mySideboard && mView->deck() != myCommandZone && mView->deck() != myDungeonZone)
|
||||
filterButton->Render();
|
||||
menuButton->Render();
|
||||
statsPrevButton->Render();
|
||||
toggleViewButton->Render();
|
||||
toggleUpButton->Render();
|
||||
|
||||
@@ -55,6 +55,8 @@ void GameStateOptions::Start()
|
||||
// optionsList->Add(NEW OptionInteger(Options::INTERRUPTMYABILITIES, "Interrupt my abilities"));
|
||||
//this is a dev option, not meant for standard play. uncomment if you need to see abilities you own hitting the stack.
|
||||
optionsList->Add(NEW OptionInteger(Options::INTERRUPT_SECONDMAIN, "Interrupt opponent's end of turn"));
|
||||
optionsList->Add(NEW WGuiButton(NEW WGuiHeader("Back to Main Menu"), -102, GameStateOptionsConst::kBackToMainMenuID, this));
|
||||
optionsList->Add(NEW WGuiButton(NEW WGuiHeader("Save And Exit"), -102, GameStateOptionsConst::kSaveAndBackToMainMenuID, this));
|
||||
optionsTabs = NEW WGuiTabMenu();
|
||||
optionsTabs->Add(optionsList);
|
||||
|
||||
|
||||
@@ -79,9 +79,10 @@ GameStateShop::GameStateShop(GameApp* parent) :
|
||||
kOtherCardsString = _(kOtherCardsString);
|
||||
kCreditsString = _(kCreditsString);
|
||||
|
||||
cycleCardsButton = NEW InteractiveButton(NULL, kCycleCardsButtonId, Fonts::MAIN_FONT, "New Cards", SCREEN_WIDTH_F - 80, SCREEN_HEIGHT_F - 20, JGE_BTN_PRI);
|
||||
cycleCardsButton = NEW InteractiveButton(NULL, kCycleCardsButtonId, Fonts::MAIN_FONT, "New Cards", SCREEN_WIDTH_F - 110, SCREEN_HEIGHT_F - 20, JGE_BTN_PRI);
|
||||
|
||||
showCardListButton = NEW InteractiveButton(NULL, kShowCardListButtonId, Fonts::MAIN_FONT, "Show List", SCREEN_WIDTH_F - 150, SCREEN_HEIGHT_F - 20, JGE_BTN_SEC);
|
||||
showCardListButton = NEW InteractiveButton(NULL, kShowCardListButtonId, Fonts::MAIN_FONT, "Show List", SCREEN_WIDTH_F - 170, SCREEN_HEIGHT_F - 20, JGE_BTN_SEC);
|
||||
shopMenuButton = NEW InteractiveButton(NULL, kMenuButtonId, Fonts::MAIN_FONT, "Menu", SCREEN_WIDTH_F - 45, SCREEN_HEIGHT_F - 20, JGE_BTN_MENU);
|
||||
disablePurchase = false;
|
||||
clearInput = false;
|
||||
}
|
||||
@@ -90,6 +91,7 @@ GameStateShop::~GameStateShop()
|
||||
{
|
||||
SAFE_DELETE( cycleCardsButton );
|
||||
SAFE_DELETE( showCardListButton );
|
||||
SAFE_DELETE( shopMenuButton );
|
||||
End();
|
||||
}
|
||||
|
||||
@@ -642,9 +644,9 @@ void GameStateShop::Update(float dt)
|
||||
else if (shopMenu)
|
||||
{
|
||||
#if defined (IOS) || defined (ANDROID)
|
||||
if ((cycleCardsButton->ButtonPressed() || showCardListButton->ButtonPressed()))
|
||||
if ((cycleCardsButton->ButtonPressed() || showCardListButton->ButtonPressed() || shopMenuButton->ButtonPressed()))
|
||||
#else
|
||||
if ( (btn == JGE_BTN_OK) && (cycleCardsButton->ButtonPressed() || showCardListButton->ButtonPressed()))
|
||||
if ( (btn == JGE_BTN_OK) && (cycleCardsButton->ButtonPressed() || showCardListButton->ButtonPressed() || shopMenuButton->ButtonPressed()))
|
||||
#endif
|
||||
{
|
||||
disablePurchase = true;
|
||||
@@ -691,12 +693,14 @@ void GameStateShop::enableButtons()
|
||||
{
|
||||
cycleCardsButton->setIsSelectionValid(true);
|
||||
showCardListButton->setIsSelectionValid(true);
|
||||
shopMenuButton->setIsSelectionValid(true);
|
||||
}
|
||||
|
||||
void GameStateShop::renderButtons()
|
||||
{
|
||||
cycleCardsButton->Render();
|
||||
showCardListButton->Render();
|
||||
shopMenuButton->Render();
|
||||
}
|
||||
|
||||
void GameStateShop::Render()
|
||||
|
||||
Reference in New Issue
Block a user