Mercurial > mm7
comparison UI/UiGame.cpp @ 2019:ab7d10b66503
WritePointedObjectStatusString() fix
author | Ritor1 |
---|---|
date | Mon, 11 Nov 2013 21:01:54 +0600 |
parents | 4c3e8ec07d12 |
children | b123afb8246b |
comparison
equal
deleted
inserted
replaced
2018:4c3e8ec07d12 | 2019:ab7d10b66503 |
---|---|
1492 break; | 1492 break; |
1493 } | 1493 } |
1494 } | 1494 } |
1495 } | 1495 } |
1496 } | 1496 } |
1497 //конец пределов основного экрана------------------------ | 1497 }//конец пределов основного экрана------------------------ |
1498 } | 1498 if ( pX > 467 && pX <=639 && pY <= 479 )//пределы нижней области |
1499 for ( v1 = uNumVisibleWindows; v1 >= 0; --v1 ) // some other fullscreen ui | 1499 { |
1500 { | 1500 if ( pCurrentScreen == SCREEN_GAME ) |
1501 pWindow = &pWindowList[pVisibleWindowsIdxs[v1] - 1]; | 1501 pWindow = &pWindowList[0]; |
1502 else | |
1503 pWindow = &pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1]; | |
1502 if ( (signed int)pX >= (signed int)pWindow->uFrameX && (signed int)pX <= (signed int)pWindow->uFrameZ | 1504 if ( (signed int)pX >= (signed int)pWindow->uFrameX && (signed int)pX <= (signed int)pWindow->uFrameZ |
1503 && (signed int)pY >= (signed int)pWindow->uFrameY && (signed int)pY <= (signed int)pWindow->uFrameW ) | 1505 && (signed int)pY >= (signed int)pWindow->uFrameY && (signed int)pY <= (signed int)pWindow->uFrameW ) |
1504 { | 1506 { |
1505 for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext ) | 1507 for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext ) |
1506 { | 1508 { |
1547 } | 1549 } |
1548 break; | 1550 break; |
1549 } | 1551 } |
1550 } | 1552 } |
1551 } | 1553 } |
1552 } | 1554 //} |
1553 pMouse->uPointingObjectID = sub_46A99B(); | 1555 } |
1556 if ( pX <= 467 && pY > 351 && pY <= 479 )//пределы нижней области | |
1557 { | |
1558 //for ( v1 = uNumVisibleWindows; v1 >= 0; --v1 ) // some other fullscreen ui | |
1559 //{ | |
1560 pWindow = &pWindowList[0]; | |
1561 if ( (signed int)pX >= (signed int)pWindow->uFrameX && (signed int)pX <= (signed int)pWindow->uFrameZ | |
1562 && (signed int)pY >= (signed int)pWindow->uFrameY && (signed int)pY <= (signed int)pWindow->uFrameW ) | |
1563 { | |
1564 for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext ) | |
1565 { | |
1566 if ( !pButton ) | |
1567 break; | |
1568 switch ( pButton->uButtonType ) | |
1569 { | |
1570 case 1://for dialogue window | |
1571 if ( (signed int)pX >= (signed int)pButton->uX && (signed int)pX <= (signed int)pButton->uZ | |
1572 && (signed int)pY >= (signed int)pButton->uY && (signed int)pY <= (signed int)pButton->uW ) | |
1573 { | |
1574 pMessageType1 = (UIMessageType)pButton->field_1C; | |
1575 if ( pMessageType1 ) | |
1576 pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0); | |
1577 GameUI_SetFooterString(pButton->pButtonName); | |
1578 uLastPointedObjectID = 1; | |
1579 return; | |
1580 } | |
1581 break; | |
1582 case 2: | |
1583 if ( pX >= pButton->uX && pX <= pButton->uZ | |
1584 && pY >= pButton->uY && pY <= pButton->uW ) | |
1585 { | |
1586 pMessageType1 = (UIMessageType)pButton->field_1C; | |
1587 if ( pMessageType1 ) | |
1588 pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0); | |
1589 GameUI_SetFooterString(pButton->pButtonName); | |
1590 uLastPointedObjectID = 1; | |
1591 return; | |
1592 } | |
1593 break; | |
1594 case 3:// click on skill | |
1595 if ( pX >= pButton->uX && pX <= pButton->uZ | |
1596 && pY >= pButton->uY && pY <= pButton->uW ) | |
1597 { | |
1598 v7 = (LOBYTE(pPlayers[uActiveCharacter]->pActiveSkills[pButton->msg_param]) & 0x3F) + 1; | |
1599 if ( pPlayers[uActiveCharacter]->uSkillPoints < v7 ) | |
1600 sprintf(Str1, pGlobalTXT_LocalizationStrings[469], v7 - pPlayers[uActiveCharacter]->uSkillPoints);// "You need %d more Skill Points to advance here" | |
1601 else | |
1602 sprintf(Str1, pGlobalTXT_LocalizationStrings[468], v7);// "Clicking here will spend %d Skill Points" | |
1603 GameUI_SetFooterString(Str1); | |
1604 uLastPointedObjectID = 1; | |
1605 return; | |
1606 } | |
1607 break; | |
1608 } | |
1609 } | |
1610 } | |
1611 //} | |
1612 } | |
1613 //pMouse->uPointingObjectID = sub_46A99B(); | |
1554 if ( pMouse->uPointingObjectID == 0 ) | 1614 if ( pMouse->uPointingObjectID == 0 ) |
1555 { | 1615 { |
1556 if ( uLastPointedObjectID != 0 ) | 1616 if ( uLastPointedObjectID != 0 ) |
1557 { | 1617 { |
1558 pFooterString[0] = 0; | 1618 pFooterString[0] = 0; |