Fix inventory window origin calculation
This commit is contained in:
parent
21bc12e906
commit
89efbcd812
|
@ -3044,13 +3044,10 @@ void inventoryWindowOpenContextMenu(int keyCode, int inventoryWindowType)
|
||||||
|
|
||||||
const InventoryWindowDescription* windowDescription = &(gInventoryWindowDescriptions[inventoryWindowType]);
|
const InventoryWindowDescription* windowDescription = &(gInventoryWindowDescriptions[inventoryWindowType]);
|
||||||
|
|
||||||
// Maintain original position in original resolution, otherwise center it.
|
Rect windowRect;
|
||||||
int inventoryWindowX = screenGetWidth() != 640
|
windowGetRect(gInventoryWindow, &windowRect);
|
||||||
? (screenGetWidth() - windowDescription->width) / 2
|
int inventoryWindowX = windowRect.left;
|
||||||
: windowDescription->x;
|
int inventoryWindowY = windowRect.top;
|
||||||
int inventoryWindowY = screenGetHeight() != 480
|
|
||||||
? (screenGetHeight() - windowDescription->height) / 2
|
|
||||||
: windowDescription->y;
|
|
||||||
|
|
||||||
gameMouseRenderActionMenuItems(x, y, actionMenuItems, actionMenuItemsLength,
|
gameMouseRenderActionMenuItems(x, y, actionMenuItems, actionMenuItemsLength,
|
||||||
windowDescription->width + inventoryWindowX,
|
windowDescription->width + inventoryWindowX,
|
||||||
|
|
Loading…
Reference in New Issue