From d3c7904e64d35f07c71de10cab2ae4c080231ba6 Mon Sep 17 00:00:00 2001 From: Andrew Lanzone Date: Sat, 31 May 2025 16:34:07 -0700 Subject: [PATCH] Rename controller help function in item view --- apps/openmw/mwgui/alchemywindow.cpp | 2 +- apps/openmw/mwgui/container.cpp | 2 +- apps/openmw/mwgui/inventorywindow.cpp | 8 ++++---- apps/openmw/mwgui/itemselection.cpp | 2 +- apps/openmw/mwgui/itemview.cpp | 2 +- apps/openmw/mwgui/itemview.hpp | 2 +- apps/openmw/mwgui/tradewindow.cpp | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp index fe82ead93f..32334962fb 100644 --- a/apps/openmw/mwgui/alchemywindow.cpp +++ b/apps/openmw/mwgui/alchemywindow.cpp @@ -616,7 +616,7 @@ namespace MWGui else if (arg.button == SDL_CONTROLLER_BUTTON_RIGHTSHOULDER) onIncreaseButtonTriggered(); else - mItemView->onControllerButtonEvent(arg.button); + mItemView->onControllerButton(arg.button); } return true; diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 1657225343..c6c810c80e 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -391,7 +391,7 @@ namespace MWGui arg.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT || arg.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT) { - mItemView->onControllerButtonEvent(arg.button); + mItemView->onControllerButton(arg.button); } return true; diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 2e128f15f8..da071cb753 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -914,7 +914,7 @@ namespace MWGui } else if (arg.button == SDL_CONTROLLER_BUTTON_A) { - mItemView->onControllerButtonEvent(SDL_CONTROLLER_BUTTON_A); + mItemView->onControllerButton(SDL_CONTROLLER_BUTTON_A); // The following actions are done here, not in onItemSelectedFromSourceModel, because we // want the mouse to work even in controller mode. if (mGuiMode == MWGui::GM_Inventory && mDragAndDrop->mIsOnDragAndDrop) @@ -946,7 +946,7 @@ namespace MWGui if (mGuiMode == MWGui::GM_Inventory) { // Drop the item into the gameworld - mItemView->onControllerButtonEvent(SDL_CONTROLLER_BUTTON_A); + mItemView->onControllerButton(SDL_CONTROLLER_BUTTON_A); if (mDragAndDrop->mIsOnDragAndDrop) MWBase::Environment::get().getWindowManager()->getHud()->dropDraggedItem(0.5f, 0.5f); } @@ -972,7 +972,7 @@ namespace MWGui if (mGuiMode == MWGui::GM_Inventory) { // Unequip an item. - mItemView->onControllerButtonEvent(SDL_CONTROLLER_BUTTON_A); + mItemView->onControllerButton(SDL_CONTROLLER_BUTTON_A); onBackgroundSelected(); // Drop on inventory background to unequip } } @@ -1004,7 +1004,7 @@ namespace MWGui } else { - mItemView->onControllerButtonEvent(arg.button); + mItemView->onControllerButton(arg.button); } return true; diff --git a/apps/openmw/mwgui/itemselection.cpp b/apps/openmw/mwgui/itemselection.cpp index 86d584f24d..a00c754c3d 100644 --- a/apps/openmw/mwgui/itemselection.cpp +++ b/apps/openmw/mwgui/itemselection.cpp @@ -77,7 +77,7 @@ namespace MWGui if (arg.button == SDL_CONTROLLER_BUTTON_B) onCancelButtonClicked(nullptr); else - mItemView->onControllerButtonEvent(arg.button); + mItemView->onControllerButton(arg.button); return true; } diff --git a/apps/openmw/mwgui/itemview.cpp b/apps/openmw/mwgui/itemview.cpp index 9cde52f0c2..08e5236fc6 100644 --- a/apps/openmw/mwgui/itemview.cpp +++ b/apps/openmw/mwgui/itemview.cpp @@ -202,7 +202,7 @@ namespace MWGui updateControllerFocus(mControllerFocus, -1); } - void ItemView::onControllerButtonEvent(const unsigned char button) + void ItemView::onControllerButton(const unsigned char button) { if (!mItemCount) return; diff --git a/apps/openmw/mwgui/itemview.hpp b/apps/openmw/mwgui/itemview.hpp index 091436ab05..29d44c6b09 100644 --- a/apps/openmw/mwgui/itemview.hpp +++ b/apps/openmw/mwgui/itemview.hpp @@ -35,7 +35,7 @@ namespace MWGui void setActiveControllerWindow(bool active); int getControllerFocus() { return mControllerFocus; } int getItemCount() { return mItemCount; } - void onControllerButtonEvent(const unsigned char button); + void onControllerButton(const unsigned char button); private: void initialiseOverride() override; diff --git a/apps/openmw/mwgui/tradewindow.cpp b/apps/openmw/mwgui/tradewindow.cpp index 3e4b8732bb..69b16dfc93 100644 --- a/apps/openmw/mwgui/tradewindow.cpp +++ b/apps/openmw/mwgui/tradewindow.cpp @@ -726,7 +726,7 @@ namespace MWGui arg.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT || arg.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT) { - mItemView->onControllerButtonEvent(arg.button); + mItemView->onControllerButton(arg.button); } return true;