Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 02a0344

Browse files
committed
2 parents 4ccd5a1 + 83c77ed commit 02a0344

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ This can be accessed via the new Lua (R/W) `SettingsMan` property `AIUpdateInter
476476
Shift-clicking an item (or Shift + Fire in keyboard-only) in the cart will now empty the entire cart.
477477
Items in the cart will be indented to signify what actor's inventory they belong to.
478478
Middle-clicking (or pressing the Pickup key) on an item will duplicate it. This also duplicates an actor's inventory.
479-
You can now reorganize the cart by click-dragging, or by holding the item selection key and inputting up/down.
479+
You can now reorganize the cart by click-dragging. For kbd-only you can do this by holding the sharp aim key and pressing up/down.
480480

481481
- Added to Lua enum `ControlState` the state `RELEASE_FACEBUTTON`.
482482

Menus/BuyMenuGUI.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,8 @@ void BuyMenuGUI::Update()
16061606
}
16071607

16081608
// Fire button removes items from the order list, including equipment on AHumans
1609-
if (m_pController->IsState(RELEASE_FACEBUTTON) && !m_IsDragging) {
1609+
bool isKeyboardControlled = !m_pController->IsMouseControlled() && !m_pController->IsGamepadControlled();
1610+
if (isKeyboardControlled ? (m_pController->IsState(PRESS_FACEBUTTON) && !m_pController->IsState(AIM_SHARP)) : (m_pController->IsState(RELEASE_FACEBUTTON) && !m_IsDragging)) {
16101611
if (g_UInputMan.FlagShiftState()) {
16111612
ClearCartList();
16121613
pItem = nullptr;
@@ -1641,7 +1642,7 @@ void BuyMenuGUI::Update()
16411642
DuplicateCartItem(m_ListItemIndex);
16421643
}
16431644

1644-
if (m_pController->IsState(PRESS_FACEBUTTON)) {
1645+
if (isKeyboardControlled ? m_pController->IsState(AIM_SHARP) : m_pController->IsState(PRESS_FACEBUTTON)) {
16451646
m_DraggedItemIndex = m_pCartList->GetSelectedIndex();
16461647
} else if (m_pController->IsState(RELEASE_FACEBUTTON)) {
16471648
m_DraggedItemIndex = -1;

0 commit comments

Comments
 (0)