From 48c57a4fed502e182db98e5a48371245f7a0754d Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Sat, 26 Sep 2009 11:08:20 +0000 Subject: [PATCH] Erwan - fix issue 36 (Life points hidden by big card) --- projects/mtg/include/GuiAvatars.h | 1 + projects/mtg/src/CardGui.cpp | 1 - projects/mtg/src/DuelLayers.cpp | 2 +- projects/mtg/src/GuiAvatars.cpp | 4 ++++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/mtg/include/GuiAvatars.h b/projects/mtg/include/GuiAvatars.h index 52aeca4c3..20161e65f 100644 --- a/projects/mtg/include/GuiAvatars.h +++ b/projects/mtg/include/GuiAvatars.h @@ -27,6 +27,7 @@ class GuiAvatars : public GuiLayer int receiveEventPlus(WEvent*); int receiveEventMinus(WEvent*); bool CheckUserInput(u32 key); + float LeftBoundarySelf(); }; #endif // _GUIAVATARS_H_ diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 4dd14dcec..1b6e808d9 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -269,7 +269,6 @@ void CardGui::RenderBig(const Pos& pos){ } // If we come here, we do not have the picture. - //MTGCard * mtgcard = card->model; alternateRender(card,pos); } diff --git a/projects/mtg/src/DuelLayers.cpp b/projects/mtg/src/DuelLayers.cpp index d9e217d52..641a24df8 100644 --- a/projects/mtg/src/DuelLayers.cpp +++ b/projects/mtg/src/DuelLayers.cpp @@ -169,5 +169,5 @@ int DuelLayers::receiveEvent(WEvent * e){ float DuelLayers::RightBoundary() { - return hand->LeftBoundary(); + return MIN (hand->LeftBoundary(), avatars->LeftBoundarySelf()); } diff --git a/projects/mtg/src/GuiAvatars.cpp b/projects/mtg/src/GuiAvatars.cpp index 0f3834147..515fcd491 100644 --- a/projects/mtg/src/GuiAvatars.cpp +++ b/projects/mtg/src/GuiAvatars.cpp @@ -22,6 +22,10 @@ GuiAvatars::GuiAvatars(CardSelector* cs) : cs(cs), active(NULL) selfGraveyard->alpha = selfLibrary->alpha = opponentGraveyard->alpha = opponentLibrary->alpha = 0; } +float GuiAvatars::LeftBoundarySelf(){ + return SCREEN_WIDTH - 10; +} + GuiAvatars::~GuiAvatars() { }