mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-14 23:05:57 -04:00
Rename controller help function in item view
This commit is contained in:
parent
5276d7bab2
commit
d3c7904e64
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user