mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-15 15:30:56 -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)
|
else if (arg.button == SDL_CONTROLLER_BUTTON_RIGHTSHOULDER)
|
||||||
onIncreaseButtonTriggered();
|
onIncreaseButtonTriggered();
|
||||||
else
|
else
|
||||||
mItemView->onControllerButtonEvent(arg.button);
|
mItemView->onControllerButton(arg.button);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -391,7 +391,7 @@ namespace MWGui
|
|||||||
arg.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT ||
|
arg.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT ||
|
||||||
arg.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT)
|
arg.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT)
|
||||||
{
|
{
|
||||||
mItemView->onControllerButtonEvent(arg.button);
|
mItemView->onControllerButton(arg.button);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -914,7 +914,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
else if (arg.button == SDL_CONTROLLER_BUTTON_A)
|
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
|
// The following actions are done here, not in onItemSelectedFromSourceModel, because we
|
||||||
// want the mouse to work even in controller mode.
|
// want the mouse to work even in controller mode.
|
||||||
if (mGuiMode == MWGui::GM_Inventory && mDragAndDrop->mIsOnDragAndDrop)
|
if (mGuiMode == MWGui::GM_Inventory && mDragAndDrop->mIsOnDragAndDrop)
|
||||||
@ -946,7 +946,7 @@ namespace MWGui
|
|||||||
if (mGuiMode == MWGui::GM_Inventory)
|
if (mGuiMode == MWGui::GM_Inventory)
|
||||||
{
|
{
|
||||||
// Drop the item into the gameworld
|
// Drop the item into the gameworld
|
||||||
mItemView->onControllerButtonEvent(SDL_CONTROLLER_BUTTON_A);
|
mItemView->onControllerButton(SDL_CONTROLLER_BUTTON_A);
|
||||||
if (mDragAndDrop->mIsOnDragAndDrop)
|
if (mDragAndDrop->mIsOnDragAndDrop)
|
||||||
MWBase::Environment::get().getWindowManager()->getHud()->dropDraggedItem(0.5f, 0.5f);
|
MWBase::Environment::get().getWindowManager()->getHud()->dropDraggedItem(0.5f, 0.5f);
|
||||||
}
|
}
|
||||||
@ -972,7 +972,7 @@ namespace MWGui
|
|||||||
if (mGuiMode == MWGui::GM_Inventory)
|
if (mGuiMode == MWGui::GM_Inventory)
|
||||||
{
|
{
|
||||||
// Unequip an item.
|
// Unequip an item.
|
||||||
mItemView->onControllerButtonEvent(SDL_CONTROLLER_BUTTON_A);
|
mItemView->onControllerButton(SDL_CONTROLLER_BUTTON_A);
|
||||||
onBackgroundSelected(); // Drop on inventory background to unequip
|
onBackgroundSelected(); // Drop on inventory background to unequip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1004,7 +1004,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mItemView->onControllerButtonEvent(arg.button);
|
mItemView->onControllerButton(arg.button);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -77,7 +77,7 @@ namespace MWGui
|
|||||||
if (arg.button == SDL_CONTROLLER_BUTTON_B)
|
if (arg.button == SDL_CONTROLLER_BUTTON_B)
|
||||||
onCancelButtonClicked(nullptr);
|
onCancelButtonClicked(nullptr);
|
||||||
else
|
else
|
||||||
mItemView->onControllerButtonEvent(arg.button);
|
mItemView->onControllerButton(arg.button);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ namespace MWGui
|
|||||||
updateControllerFocus(mControllerFocus, -1);
|
updateControllerFocus(mControllerFocus, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemView::onControllerButtonEvent(const unsigned char button)
|
void ItemView::onControllerButton(const unsigned char button)
|
||||||
{
|
{
|
||||||
if (!mItemCount)
|
if (!mItemCount)
|
||||||
return;
|
return;
|
||||||
|
@ -35,7 +35,7 @@ namespace MWGui
|
|||||||
void setActiveControllerWindow(bool active);
|
void setActiveControllerWindow(bool active);
|
||||||
int getControllerFocus() { return mControllerFocus; }
|
int getControllerFocus() { return mControllerFocus; }
|
||||||
int getItemCount() { return mItemCount; }
|
int getItemCount() { return mItemCount; }
|
||||||
void onControllerButtonEvent(const unsigned char button);
|
void onControllerButton(const unsigned char button);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initialiseOverride() override;
|
void initialiseOverride() override;
|
||||||
|
@ -726,7 +726,7 @@ namespace MWGui
|
|||||||
arg.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT ||
|
arg.button == SDL_CONTROLLER_BUTTON_DPAD_LEFT ||
|
||||||
arg.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT)
|
arg.button == SDL_CONTROLLER_BUTTON_DPAD_RIGHT)
|
||||||
{
|
{
|
||||||
mItemView->onControllerButtonEvent(arg.button);
|
mItemView->onControllerButton(arg.button);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user