Rename controller help function in item view

This commit is contained in:
Andrew Lanzone 2025-05-31 16:34:07 -07:00
parent 5276d7bab2
commit d3c7904e64
7 changed files with 10 additions and 10 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;