diff --git a/projects/mtg/include/PrecompiledHeader.h b/projects/mtg/include/PrecompiledHeader.h index 8bbbdf585..dfae3dc8a 100644 --- a/projects/mtg/include/PrecompiledHeader.h +++ b/projects/mtg/include/PrecompiledHeader.h @@ -23,7 +23,7 @@ #include -#if defined (IOS) || defined (ANDROID) || defined (QT_CONFIG) +#if defined (IOS) || defined (ANDROID) || defined (QT_CONFIG) || defined (SDL_CONFIG) #define TOUCH_ENABLED #endif diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index 36d5bcef5..e20f9d44a 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -63,8 +63,8 @@ GameStateDeckViewer::GameStateDeckViewer(GameApp* parent) : sellCardButton = NEW InteractiveButton(NULL, kSellCardActionId, Fonts::MAIN_FONT, "Sell Card", (SCREEN_WIDTH_F/ 2) - 100, SCREEN_HEIGHT_F - 15, JGE_BTN_SEC); statsNextButton = NEW InteractiveButton(NULL, kNextStatsButtonId, Fonts::MAIN_FONT, "Stats ->", SCREEN_WIDTH_F - 50, SCREEN_HEIGHT_F - 40, JGE_BTN_NEXT); statsPrevButton = NEW InteractiveButton(NULL, kPrevStatsButtonId, Fonts::MAIN_FONT, "<- Stats", SCREEN_WIDTH_F - 115, SCREEN_HEIGHT_F - 40, JGE_BTN_PREV); - menuButton = NEW InteractiveButton(NULL, kMenuButtonId, Fonts::MAIN_FONT, "menu", SCREEN_WIDTH_F - 35, SCREEN_HEIGHT_F - 15, JGE_BTN_MENU); - filterButton = NEW InteractiveButton(NULL, kFilterButtonId, Fonts::MAIN_FONT, "filter", (SCREEN_WIDTH_F - 95), SCREEN_HEIGHT_F - 15, JGE_BTN_CTRL); + menuButton = NEW InteractiveButton(NULL, kMenuButtonId, Fonts::MAIN_FONT, "menu", SCREEN_WIDTH_F - 40, SCREEN_HEIGHT_F - 15, JGE_BTN_MENU); + filterButton = NEW InteractiveButton(NULL, kFilterButtonId, Fonts::MAIN_FONT, "filter", (SCREEN_WIDTH_F - 110), SCREEN_HEIGHT_F - 15, JGE_BTN_CTRL); } GameStateDeckViewer::~GameStateDeckViewer() diff --git a/projects/mtg/src/InteractiveButton.cpp b/projects/mtg/src/InteractiveButton.cpp index dcbdd9960..62090855b 100644 --- a/projects/mtg/src/InteractiveButton.cpp +++ b/projects/mtg/src/InteractiveButton.cpp @@ -68,21 +68,18 @@ void InteractiveButton::Render() float stringWidth = mainFont->GetStringWidth(detailedInfoString.c_str()); float pspIconsSize = 0.5; float mainFontHeight = mainFont->GetHeight(); - float boxStartX = 0; - -#ifndef TOUCH_ENABLED - mXOffset = -5; - mYOffset = 10; - boxStartX = getX() - 5; - renderer->FillRoundRect( boxStartX, getY() - 5, stringWidth, mainFontHeight + 15, .5, ARGB( 255, 0, 0, 0) ); -#else + float boxStartX = getX() - 5; mXOffset = 0; mYOffset = 0; - boxStartX = getX() - 5; - renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFont->GetHeight() - 9, 5, ARGB(255, 192, 172, 119)); - renderer->DrawRoundRect(boxStartX, getY(), stringWidth - 3, mainFont->GetHeight() - 9, 5, ARGB(255, 255, 255, 255)); + +#ifndef TOUCH_ENABLED + renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(0, 0, 0, 0)); +#else + renderer->FillRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(255, 192, 172, 119)); + renderer->DrawRoundRect(boxStartX, getY(), stringWidth - 3, mainFontHeight - 9, 5, ARGB(255, 255, 255, 255)); #endif - float buttonXOffset = getX() - mXOffset; + + float buttonXOffset = getX() - mXOffset; float buttonYOffset = getY() + mYOffset; if (buttonImage != NULL) {