Mercurial > mm7
comparison UI/UIPopup.cpp @ 1842:175bf8da83d9
Merge
author | Grumpy7 |
---|---|
date | Sun, 13 Oct 2013 06:32:06 +0200 |
parents | 211dfe2d8db1 303a56458f7b |
children | 2e6d3cd052e0 |
comparison
equal
deleted
inserted
replaced
1841:f094bfb4ba31 | 1842:175bf8da83d9 |
---|---|
1592 signed int potionID; // edx@27 | 1592 signed int potionID; // edx@27 |
1593 unsigned int pOut_y; // edx@57 | 1593 unsigned int pOut_y; // edx@57 |
1594 double v31; // st7@112 | 1594 double v31; // st7@112 |
1595 Vec3_int_ v39; // [sp-18h] [bp-A8h]@83 | 1595 Vec3_int_ v39; // [sp-18h] [bp-A8h]@83 |
1596 GUIWindow message_window; // [sp+Ch] [bp-84h]@137 | 1596 GUIWindow message_window; // [sp+Ch] [bp-84h]@137 |
1597 POINT a2; // [sp+78h] [bp-18h]@2 | 1597 POINT cursor; // [sp+78h] [bp-18h]@2 |
1598 unsigned int damage_level; // [sp+8Ch] [bp-4h]@23 | 1598 unsigned int damage_level; // [sp+8Ch] [bp-4h]@23 |
1599 | 1599 |
1600 if (no_rightlick_in_inventory) | 1600 if (no_rightlick_in_inventory) |
1601 return; | 1601 return; |
1602 | 1602 |
1603 pMouse->GetCursorPos(&a2); | 1603 pMouse->GetCursorPos(&cursor); |
1604 int item_pid = (pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF) - 1; | 1604 int item_pid = (pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]] & 0xFFFF) - 1; |
1605 auto item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; | 1605 auto item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; |
1606 | 1606 |
1607 if (a2.x <= 13 || a2.x >= 462)//items out of inventory(вещи вне инвентаря) | 1607 if (cursor.x <= 13 || cursor.x >= 462)//items out of inventory(вещи вне инвентаря) |
1608 { | 1608 { |
1609 GameUI_DrawItemInfo(item); | 1609 GameUI_DrawItemInfo(item); |
1610 return; | 1610 return; |
1611 } | 1611 } |
1612 | 1612 |
1613 if (!item_pid) | 1613 if (!item_pid) |
1614 { | 1614 { |
1615 int inventory_mouse_x = a2.x - 14; | 1615 int inventory_mouse_x = cursor.x - 14; |
1616 int inventory_mouse_y = a2.y - 17; | 1616 int inventory_mouse_y = cursor.y - 17; |
1617 | 1617 |
1618 int mouse_cell_x = inventory_mouse_x / 32; | 1618 int mouse_cell_x = inventory_mouse_x / 32; |
1619 int mouse_cell_y = inventory_mouse_y / 32; | 1619 int mouse_cell_y = inventory_mouse_y / 32; |
1620 | 1620 |
1621 if (mouse_cell_x + mouse_cell_y < 0) | 1621 if (mouse_cell_x + mouse_cell_y < 0) |
1635 { | 1635 { |
1636 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427], pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//%s не в состоянии %s Опознать предметы | 1636 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427], pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//%s не в состоянии %s Опознать предметы |
1637 message_window.Hint = pTmpBuf.data(); | 1637 message_window.Hint = pTmpBuf.data(); |
1638 message_window.uFrameWidth = 384; | 1638 message_window.uFrameWidth = 384; |
1639 message_window.uFrameHeight = 180; | 1639 message_window.uFrameHeight = 180; |
1640 if (a2.x <= 320 ) | 1640 if (cursor.x <= 320 ) |
1641 message_window.uFrameX = a2.x + 30; | 1641 message_window.uFrameX = cursor.x + 30; |
1642 else | 1642 else |
1643 message_window.uFrameX = a2.x - 414; | 1643 message_window.uFrameX = cursor.x - 414; |
1644 message_window.uFrameY = 40; | 1644 message_window.uFrameY = 40; |
1645 message_window.DrawMessageBox(0); | 1645 message_window.DrawMessageBox(0); |
1646 return; | 1646 return; |
1647 } | 1647 } |
1648 | 1648 |