Skip to content

Commit 5f37234

Browse files
committed
Fixed issue that disallowed selection on keyboard
1 parent 6105132 commit 5f37234

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Source/Menus/BuyMenuGUI.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,9 +1281,16 @@ void BuyMenuGUI::Update() {
12811281
}
12821282

12831283
// User selected to add an item to cart list!
1284-
if (m_pController->IsState(PRESS_FACEBUTTON) && !m_IsDragging) {
1284+
if (m_pController->IsState(RELEASE_FACEBUTTON) && !m_IsDragging) {
1285+
// User pressed on a loadout set, so load it into the menu
1286+
if (pItem && m_MenuCategory == LOADOUTS) {
1287+
// Beep if there's an error
1288+
if (!DeployLoadout(m_ListItemIndex)) {
1289+
g_GUISound.UserErrorSound()->Play(m_pController->GetPlayer());
1290+
}
1291+
}
12851292
// User pressed on a module group item; toggle its expansion!
1286-
if (pItem && pItem->m_ExtraIndex >= 0) {
1293+
else if (pItem && pItem->m_ExtraIndex >= 0) {
12871294
// Make appropriate sound
12881295
if (!m_aExpandedModules[pItem->m_ExtraIndex]) {
12891296
g_GUISound.ItemChangeSound()->Play(m_pController->GetPlayer());
@@ -1296,12 +1303,6 @@ void BuyMenuGUI::Update() {
12961303
// Re-populate the item list with the new module expansion configuation
12971304
CategoryChange(false);
12981305
}
1299-
// User pressed on a loadout set, so load it into the menu
1300-
else if (pItem && m_MenuCategory == LOADOUTS) {
1301-
// Beep if there's an error
1302-
if (!DeployLoadout(m_ListItemIndex))
1303-
g_GUISound.UserErrorSound()->Play(m_pController->GetPlayer());
1304-
}
13051306
// User mashed button on a regular shop item, add it to cargo, or select craft
13061307
else if (pItem && pItem->m_pEntity) {
13071308
// Select the craft

0 commit comments

Comments
 (0)