Browse Source

Fix item graphics on potion buttons for virtual gamepad

pull/4518/head
staphen 4 years ago committed by Anders Jenbo
parent
commit
ef9ae41f6a
  1. 5
      Source/controls/touch/renderers.cpp

5
Source/controls/touch/renderers.cpp

@ -138,8 +138,9 @@ void LoadPotionArt(Art *potionArt, SDL_Renderer *renderer)
Point position { 0, 0 };
for (item_cursor_graphic graphic : potionGraphics) {
const int frame = CURSOR_FIRSTITEM + graphic;
const OwnedCelSprite &potionSprite = GetInvItemSprite(frame);
const int cursorID = CURSOR_FIRSTITEM + graphic;
const int frame = GetInvItemFrame(cursorID);
const OwnedCelSprite &potionSprite = GetInvItemSprite(cursorID);
position.y += potionSize.height;
CelClippedDrawTo(Surface(surface.get()), position, potionSprite, frame);
}

Loading…
Cancel
Save