+
+void SelectTarget::OnResize(int width, int height) {
+ Vector<int> offset(parent->ScreenOffset());
+ cursorOffset = Vector<int>(cursorIcon->Width() / -2, cursorIcon->Height()) + offset;
+ // offset the indicator by 1/8th to the right and top
+ indicatorOffset = cursorOffset + Vector<int>(cursorIcon->Width() / 8, cursorIcon->Height() / -8);
+
+ monsterPositions.clear();
+ monsterPositions.reserve(battle->NumMonsters());
+ for (int i(0), end(battle->NumMonsters()); i < end; ++i) {
+ monsterPositions.push_back(battle->MonsterAt(i).Position());
+ }
+
+ heroPositions.clear();
+ heroPositions.reserve(battle->NumHeroes());
+ for (int i(0), end(battle->NumHeroes()); i < end; ++i) {
+ heroPositions.push_back(parent->HeroTagPositionAt(i) + parent->HeroTagAt(i).HeroOffset());
+ }