Skip to content

Commit

Permalink
Cursor: Scale dragged items using HUD scale
Browse files Browse the repository at this point in the history
Implements: Enhancement #996
  • Loading branch information
bsxf-47 committed May 15, 2017
1 parent 0ef5f16 commit 283ff06
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui/Cursor.cpp
Expand Up @@ -636,13 +636,14 @@ static void ARX_INTERFACE_RenderCursorInternal(bool flag) {
pos = MemoMouse;
}

Rectf rect(pos, float(tc->m_size.x), float(tc->m_size.y));
Vec2f size = Vec2f(tc->m_size) * iconScale;
Rectf rect(pos, size.x, size.y);

if(!(DRAGINTER->ioflags & IO_MOVABLE)) {
EERIEDrawBitmap(rect, .00001f, tc, color);

if((DRAGINTER->ioflags & IO_ITEM) && DRAGINTER->_itemdata->count != 1) {
Vec2f nuberOffset = Vec2f(2.f, 13.f);
Vec2f nuberOffset = Vec2f(2.f, 13.f) * iconScale;
ARX_INTERFACE_DrawNumber(pos + nuberOffset, DRAGINTER->_itemdata->count, 3, Color::white, 1.f);
}
} else {
Expand All @@ -667,7 +668,7 @@ static void ARX_INTERFACE_RenderCursorInternal(bool flag) {
}

if(haloTc) {
ARX_INTERFACE_HALO_Draw(DRAGINTER, tc, haloTc, pos, Vec2f(1));
ARX_INTERFACE_HALO_Draw(DRAGINTER, tc, haloTc, pos, Vec2f(iconScale));
}
} else {
cursorAnimatedHand.update2();
Expand Down

0 comments on commit 283ff06

Please sign in to comment.