modified buttons for touch interfaces. The help screen has been modified to have all PSP button information removed. The layout of the buttons have been moved as has the size of the buttons.
This commit is contained in:
@@ -153,6 +153,9 @@ extern NSString *const kReachabilityChangedNotification;
|
|||||||
// Use to check the reachability of a particular IP address.
|
// Use to check the reachability of a particular IP address.
|
||||||
+ (Reachability *) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
|
+ (Reachability *) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
|
||||||
|
|
||||||
|
// Use to check the reachability of the Google DNS Servers.
|
||||||
|
+ (Reachability *) reachabilityForGoogleDNS;
|
||||||
|
|
||||||
// Use to check whether the default route is available.
|
// Use to check whether the default route is available.
|
||||||
// Should be used to, at minimum, establish network connectivity.
|
// Should be used to, at minimum, establish network connectivity.
|
||||||
+ (Reachability *) reachabilityForInternetConnection;
|
+ (Reachability *) reachabilityForInternetConnection;
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ GameStateDeckViewer::GameStateDeckViewer(GameApp* parent) :
|
|||||||
menu = NULL;
|
menu = NULL;
|
||||||
stw = NULL;
|
stw = NULL;
|
||||||
|
|
||||||
toggleDeckButton = NEW InteractiveButton(NULL, kToggleDeckActionId, Fonts::MAIN_FONT, "View Deck", 10, SCREEN_HEIGHT_F - 15, JGE_BTN_PRI);
|
statsNextButton = NEW InteractiveButton(NULL, kNextStatsButtonId, Fonts::MAIN_FONT, "Stats ->", SCREEN_WIDTH_F - 50, 5, JGE_BTN_NEXT);
|
||||||
sellCardButton = NEW InteractiveButton(NULL, kSellCardActionId, Fonts::MAIN_FONT, "Sell Card", (SCREEN_WIDTH_F/ 2) - 100, SCREEN_HEIGHT_F - 15, JGE_BTN_SEC);
|
statsPrevButton = NEW InteractiveButton(NULL, kPrevStatsButtonId, Fonts::MAIN_FONT, "<- Stats", 10, 5, JGE_BTN_PREV);
|
||||||
statsNextButton = NEW InteractiveButton(NULL, kNextStatsButtonId, Fonts::MAIN_FONT, "Stats ->", SCREEN_WIDTH_F - 50, SCREEN_HEIGHT_F - 40, JGE_BTN_NEXT);
|
toggleDeckButton = NEW InteractiveButton(NULL, kToggleDeckActionId, Fonts::MAIN_FONT, "View Deck", 10, SCREEN_HEIGHT_F - 20, JGE_BTN_PRI);
|
||||||
statsPrevButton = NEW InteractiveButton(NULL, kPrevStatsButtonId, Fonts::MAIN_FONT, "<- Stats", SCREEN_WIDTH_F - 115, SCREEN_HEIGHT_F - 40, JGE_BTN_PREV);
|
sellCardButton = NEW InteractiveButton(NULL, kSellCardActionId, Fonts::MAIN_FONT, "Sell Card", (SCREEN_WIDTH_F/ 2) - 100, SCREEN_HEIGHT_F - 20, JGE_BTN_SEC);
|
||||||
menuButton = NEW InteractiveButton(NULL, kMenuButtonId, Fonts::MAIN_FONT, "menu", SCREEN_WIDTH_F - 40, SCREEN_HEIGHT_F - 15, JGE_BTN_MENU);
|
menuButton = NEW InteractiveButton(NULL, kMenuButtonId, Fonts::MAIN_FONT, "menu", SCREEN_WIDTH_F - 40, SCREEN_HEIGHT_F - 20, JGE_BTN_MENU);
|
||||||
filterButton = NEW InteractiveButton(NULL, kFilterButtonId, Fonts::MAIN_FONT, "filter", (SCREEN_WIDTH_F - 110), SCREEN_HEIGHT_F - 15, JGE_BTN_CTRL);
|
filterButton = NEW InteractiveButton(NULL, kFilterButtonId, Fonts::MAIN_FONT, "filter", (SCREEN_WIDTH_F - 110), SCREEN_HEIGHT_F - 20, JGE_BTN_CTRL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameStateDeckViewer::~GameStateDeckViewer()
|
GameStateDeckViewer::~GameStateDeckViewer()
|
||||||
@@ -727,9 +727,16 @@ void GameStateDeckViewer::renderOnScreenBasicInfo()
|
|||||||
WSrcDeck::UNFILTERED_UNIQUE));
|
WSrcDeck::UNFILTERED_UNIQUE));
|
||||||
|
|
||||||
float w = mFont->GetStringWidth(buffer);
|
float w = mFont->GetStringWidth(buffer);
|
||||||
renderer->FillRoundRect(SCREEN_WIDTH - (w + 27), y + 5, w + 10, 15, 5, ARGB(128,0,0,0));
|
|
||||||
|
|
||||||
|
#ifdef TOUCH_ENABLED
|
||||||
|
float textXOffset = SCREEN_WIDTH - (statsNextButton->GetWidth() + w + 30);
|
||||||
|
renderer->FillRoundRect( textXOffset - 5, y, w + 10, mFont->GetHeight() + 4, 5, ARGB(128,0,0,0));
|
||||||
|
mFont->DrawString(buffer, textXOffset, y + 5, JGETEXT_LEFT);
|
||||||
|
#else
|
||||||
|
renderer->FillRoundRect(SCREEN_WIDTH - (w + 27), y + 5, w + 10, 15, 5, ARGB(128,0,0,0));
|
||||||
mFont->DrawString(buffer, SCREEN_WIDTH - 22, y + 15, JGETEXT_RIGHT);
|
mFont->DrawString(buffer, SCREEN_WIDTH - 22, y + 15, JGETEXT_RIGHT);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (useFilter != 0) renderer->RenderQuad(mIcons[useFilter - 1].get(), SCREEN_WIDTH - 10, y + 15, 0.0f, 0.5, 0.5);
|
if (useFilter != 0) renderer->RenderQuad(mIcons[useFilter - 1].get(), SCREEN_WIDTH - 10, y + 15, 0.0f, 0.5, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -830,12 +837,19 @@ void GameStateDeckViewer::renderOnScreenMenu()
|
|||||||
float rightPspX = SCREEN_WIDTH - 100 + rightTransition;
|
float rightPspX = SCREEN_WIDTH - 100 + rightTransition;
|
||||||
float rightPspY = SCREEN_HEIGHT / 2 - 20;
|
float rightPspY = SCREEN_HEIGHT / 2 - 20;
|
||||||
|
|
||||||
|
#ifdef TOUCH_ENABLED
|
||||||
|
bool renderPSPIcons = false;
|
||||||
|
#else
|
||||||
|
bool renderPSPIcons = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (stw->currentPage == 0)
|
if (stw->currentPage == 0)
|
||||||
{
|
{
|
||||||
//FillRects
|
//FillRects
|
||||||
r->FillRect(0 - (onScreenTransition * 84), 0, 84, SCREEN_HEIGHT, ARGB(128,0,0,0));
|
r->FillRect(0 - (onScreenTransition * 84), 0, 84, SCREEN_HEIGHT, ARGB(128,0,0,0));
|
||||||
r->FillRect(SCREEN_WIDTH - 204 + (onScreenTransition * 204), 0, 200, SCREEN_HEIGHT, ARGB(128,0,0,0));
|
r->FillRect(SCREEN_WIDTH - 204 + (onScreenTransition * 204), 0, 200, SCREEN_HEIGHT, ARGB(128,0,0,0));
|
||||||
|
if (renderPSPIcons)
|
||||||
|
{
|
||||||
//LEFT PSP CIRCLE render
|
//LEFT PSP CIRCLE render
|
||||||
r->FillCircle(leftPspX, leftPspY, 40, ARGB(128,50,50,50));
|
r->FillCircle(leftPspX, leftPspY, 40, ARGB(128,50,50,50));
|
||||||
|
|
||||||
@@ -871,15 +885,42 @@ void GameStateDeckViewer::renderOnScreenMenu()
|
|||||||
font->DrawString(_("View Collection"), rightPspX - 20, rightPspY - 15, JGETEXT_RIGHT);
|
font->DrawString(_("View Collection"), rightPspX - 20, rightPspY - 15, JGETEXT_RIGHT);
|
||||||
}
|
}
|
||||||
font->DrawString(_("Sell card"), rightPspX - 30, rightPspY + 20);
|
font->DrawString(_("Sell card"), rightPspX - 30, rightPspY + 20);
|
||||||
|
|
||||||
//Bottom menus
|
//Bottom menus
|
||||||
#ifndef TOUCH_ENABLED
|
|
||||||
font->DrawString(_("menu"), SCREEN_WIDTH - 35 + rightTransition, SCREEN_HEIGHT - 15);
|
font->DrawString(_("menu"), SCREEN_WIDTH - 35 + rightTransition, SCREEN_HEIGHT - 15);
|
||||||
font->DrawString(_("filter"), SCREEN_WIDTH - 95 + rightTransition, SCREEN_HEIGHT - 15);
|
font->DrawString(_("filter"), SCREEN_WIDTH - 95 + rightTransition, SCREEN_HEIGHT - 15);
|
||||||
#endif
|
|
||||||
|
if (displayed_deck == myCollection)
|
||||||
|
{
|
||||||
|
font->DrawString(_("in: collection"), 5 - leftTransition, 5);
|
||||||
|
font->DrawString(_("Use SQUARE to view your deck,"), SCREEN_WIDTH - 200 + rightTransition, 5);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
font->DrawString(_("in: deck"), 5 - leftTransition, 5);
|
||||||
|
font->DrawString(_("Use SQUARE to view collection,"), SCREEN_WIDTH - 200 + rightTransition, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
font->DrawString(_("Press L/R to cycle through"), SCREEN_WIDTH - 200 + rightTransition, 5 + fH);
|
||||||
|
font->DrawString(_("deck statistics."), SCREEN_WIDTH - 200 + rightTransition, 5 + fH * 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// print stuff here about the editor commands
|
||||||
|
float textYOffset = SCREEN_HEIGHT_F/2;
|
||||||
|
font->DrawString(_("Click on the card image"), SCREEN_WIDTH - 200 + rightTransition, textYOffset - (2 * fH));
|
||||||
|
if (displayed_deck == myCollection)
|
||||||
|
font->DrawString(_("to add card to deck."), SCREEN_WIDTH - 200 + rightTransition, textYOffset - fH);
|
||||||
|
else
|
||||||
|
font->DrawString(_("to remove card from deck."), SCREEN_WIDTH - 200 + rightTransition, textYOffset - fH);
|
||||||
|
}
|
||||||
//Your Deck Information
|
//Your Deck Information
|
||||||
char buffer[300];
|
char buffer[300];
|
||||||
int nb_letters = 0;
|
int nb_letters = 0;
|
||||||
|
int value = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
|
||||||
|
|
||||||
|
sprintf(buffer, _("Your Deck: %i cards").c_str(), value);
|
||||||
|
font->DrawString(buffer, SCREEN_WIDTH - 200 + rightTransition, SCREEN_HEIGHT / 2 + 25);
|
||||||
|
|
||||||
for (int j = 0; j < Constants::NB_Colors; j++)
|
for (int j = 0; j < Constants::NB_Colors; j++)
|
||||||
{
|
{
|
||||||
int value = myDeck->getCount(j);
|
int value = myDeck->getCount(j);
|
||||||
@@ -899,22 +940,6 @@ void GameStateDeckViewer::renderOnScreenMenu()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int value = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES);
|
|
||||||
sprintf(buffer, _("Your Deck: %i cards").c_str(), value);
|
|
||||||
font->DrawString(buffer, SCREEN_WIDTH - 200 + rightTransition, SCREEN_HEIGHT / 2 + 25);
|
|
||||||
|
|
||||||
if (displayed_deck == myCollection)
|
|
||||||
{
|
|
||||||
font->DrawString(_("in: collection"), 5 - leftTransition, 5);
|
|
||||||
font->DrawString(_("Use SQUARE to view your deck,"), SCREEN_WIDTH - 200 + rightTransition, 5);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
font->DrawString(_("in: deck"), 5 - leftTransition, 5);
|
|
||||||
font->DrawString(_("Use SQUARE to view collection,"), SCREEN_WIDTH - 200 + rightTransition, 5);
|
|
||||||
}
|
|
||||||
font->DrawString(_("Press L/R to cycle through"), SCREEN_WIDTH - 200 + rightTransition, 5 + fH);
|
|
||||||
font->DrawString(_("deck statistics."), SCREEN_WIDTH - 200 + rightTransition, 5 + fH * 2);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -75,8 +75,9 @@ void InteractiveButton::Render()
|
|||||||
#ifndef TOUCH_ENABLED
|
#ifndef TOUCH_ENABLED
|
||||||
renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(0, 0, 0, 0));
|
renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(0, 0, 0, 0));
|
||||||
#else
|
#else
|
||||||
renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(255, 192, 172, 119));
|
renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 5, 5, ARGB(255, 192, 172, 119));
|
||||||
renderer->DrawRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(255, 255, 255, 255));
|
renderer->DrawRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 5, 5, ARGB(255, 255, 255, 255));
|
||||||
|
mYOffset += 2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float buttonXOffset = getX() - mXOffset;
|
float buttonXOffset = getX() - mXOffset;
|
||||||
|
|||||||
Reference in New Issue
Block a user