]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/HeroTag.cpp
added attack choice icons
[l2e.git] / src / battle / HeroTag.cpp
index 531031f8e93868b2cb8143b40c650b6e424d6a0f..96dedd9269e836037804c4d1a0c822375ca20763 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "HeroTag.h"
 
+#include "AttackChoice.h"
 #include "Hero.h"
 #include "Resources.h"
 #include "../geometry/operators.h"
@@ -78,6 +79,12 @@ void HeroTag::Render(SDL_Surface *screen, int width, int height, Point<int> posi
        // name
        res->normalFont->DrawString(hero->Name(), screen, position + frameOffset + alignOffset, 5);
 
+       // attack icon
+       if (choice->GetType() != AttackChoice::UNDECIDED) {
+               Vector<int> attackIconOffset(labelX + res->heroTagLabels->Width(), frameOffset.Y() + 3 * res->heroTagFont->CharHeight());
+               res->attackChoiceIcons->Draw(screen, position + attackIconOffset, 0, choice->GetType());
+       }
+
        // hero
        Vector<int> heroOffset(
                        (align == LEFT) ? yOffset : width - hero->Sprite()->Width() - yOffset,