Browse Source

fix #55: tweak item picture as dialog background moved in #54; remove shadow in dialog of money/price due to original version dont have it too; when item amount reduced to zero and the item is not last one cursor will not move

Pal Lockheart 6 years ago
parent
commit
302dba9565
3 changed files with 4 additions and 4 deletions
  1. 1 1
      global.c
  2. 1 1
      itemmenu.c
  3. 2 2
      uigame.c

+ 1 - 1
global.c

@@ -1034,7 +1034,7 @@ PAL_AddItemToInventory(
          //
          /// Need process last item
          //
-         if(gpGlobals->rgInventory[index].nAmount == 0 && index == gpGlobals->iCurInvMenuItem)
+         if(gpGlobals->rgInventory[index].nAmount == 0 && index == gpGlobals->iCurInvMenuItem && index+1 < MAX_INVENTORY && gpGlobals->rgInventory[index+1].nAmount <= 0)
             gpGlobals->iCurInvMenuItem --;
          return TRUE;
       }

+ 1 - 1
itemmenu.c

@@ -229,7 +229,7 @@ PAL_ItemSelectMenuUpdate(
 
    if (wPrevImageIndex != 0xFFFF)
    {
-      PAL_RLEBlitToSurface(bufImage, gpScreen, PAL_XY(12, 148 - iPictureYOffset));
+      PAL_RLEBlitToSurface(bufImage, gpScreen, PAL_XY(7, 148 - iPictureYOffset));
    }
 
    //

+ 2 - 2
uigame.c

@@ -1685,14 +1685,14 @@ PAL_SellMenu_OnItemChange(
    //
    // Draw the cash amount
    //
-   PAL_CreateSingleLineBox(PAL_XY(100, 150), 5, FALSE);
+   PAL_CreateSingleLineBoxWithShadow(PAL_XY(100, 150), 5, FALSE, 0);
    PAL_DrawText(PAL_GetWord(CASH_LABEL), PAL_XY(110, 160), 0, FALSE, FALSE, FALSE);
    PAL_DrawNumber(gpGlobals->dwCash, 6, PAL_XY(149, 164), kNumColorYellow, kNumAlignRight);
 
    //
    // Draw the price
    //
-   PAL_CreateSingleLineBox(PAL_XY(220, 150), 5, FALSE);
+   PAL_CreateSingleLineBoxWithShadow(PAL_XY(220, 150), 5, FALSE, 0);
 
    if (gpGlobals->g.rgObject[wCurrentItem].item.wFlags & kItemFlagSellable)
    {