Use newly exposed UI action lines in more menus

This commit is contained in:
Alexei Kotov 2025-09-01 15:50:54 +03:00
parent ea3240ce03
commit 253ac42520
18 changed files with 43 additions and 40 deletions

View File

@ -151,7 +151,7 @@ namespace MWGui
image->setImageTexture(MWBase::Environment::get().getInputManager()->getControllerButtonIcon( image->setImageTexture(MWBase::Environment::get().getInputManager()->getControllerButtonIcon(
SDL_CONTROLLER_BUTTON_RIGHTSHOULDER)); SDL_CONTROLLER_BUTTON_RIGHTSHOULDER));
mControllerButtons.mR3 = "#{sInfo}"; mControllerButtons.mR3 = "#{Interface:Info}";
} }
adjustPanes(); adjustPanes();
@ -973,7 +973,7 @@ namespace MWGui
case MWGui::GM_Container: case MWGui::GM_Container:
mControllerButtons.mA = "#{OMWEngine:InventorySelect}"; mControllerButtons.mA = "#{OMWEngine:InventorySelect}";
mControllerButtons.mB = "#{Interface:Close}"; mControllerButtons.mB = "#{Interface:Close}";
mControllerButtons.mX = "#{sTakeAll}"; mControllerButtons.mX = "#{Interface:TakeAll}";
mControllerButtons.mR2 = "#{sContainer}"; mControllerButtons.mR2 = "#{sContainer}";
break; break;
case MWGui::GM_Barter: case MWGui::GM_Barter:
@ -985,7 +985,7 @@ namespace MWGui
case MWGui::GM_Inventory: case MWGui::GM_Inventory:
default: default:
mControllerButtons.mA = "#{sEquip}"; mControllerButtons.mA = "#{sEquip}";
mControllerButtons.mB = "#{sBack}"; mControllerButtons.mB = "#{Interface:Back}";
mControllerButtons.mX = "#{sDrop}"; mControllerButtons.mX = "#{sDrop}";
mControllerButtons.mR2.clear(); mControllerButtons.mR2.clear();
break; break;

View File

@ -29,9 +29,9 @@ namespace MWGui
center(); center();
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
mControllerButtons.mR3 = "#{sInfo}"; mControllerButtons.mR3 = "#{Interface:Info}";
} }
bool ItemSelectionDialog::exit() bool ItemSelectionDialog::exit()

View File

@ -224,7 +224,7 @@ namespace
if (isRussian) // Cyrillic is either (10 + 10 + 10) or (15 + 15) if (isRussian) // Cyrillic is either (10 + 10 + 10) or (15 + 15)
mIndexRowCount = MWGui::getCyrillicIndexPageCount(); mIndexRowCount = MWGui::getCyrillicIndexPageCount();
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mX = "#{OMWEngine:JournalQuests}"; mControllerButtons.mX = "#{OMWEngine:JournalQuests}";
mControllerButtons.mY = "#{sTopics}"; mControllerButtons.mY = "#{sTopics}";

View File

@ -94,8 +94,8 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mDisableGamepadCursor = true; mDisableGamepadCursor = true;
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mX = "#{sDone}"; mControllerButtons.mX = "#{Interface:Done}";
mOkButton->setCaption( mOkButton->setCaption(
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sDone", {}))); MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sDone", {})));
} }

View File

@ -834,7 +834,7 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerButtons.mB = "#{sBack}"; mControllerButtons.mB = "#{Interface:Back}";
mControllerButtons.mX = global ? "#{sLocal}" : "#{sWorld}"; mControllerButtons.mX = global ? "#{sLocal}" : "#{sWorld}";
mControllerButtons.mY = "#{sCenter}"; mControllerButtons.mY = "#{sCenter}";
mControllerButtons.mDpad = Settings::map().mAllowZooming ? "" : "#{sMove}"; mControllerButtons.mDpad = Settings::map().mAllowZooming ? "" : "#{sMove}";

View File

@ -61,7 +61,7 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:OK}"; mControllerButtons.mB = "#{Interface:OK}";
} }
} }
@ -539,7 +539,7 @@ namespace MWGui
{ {
mDisableGamepadCursor = true; mDisableGamepadCursor = true;
mItemButton->setStateSelected(true); mItemButton->setStateSelected(true);
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
} }
@ -701,7 +701,7 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
} }

View File

@ -108,9 +108,9 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerButtons.mLStick = "#{sMouse}"; mControllerButtons.mLStick = "#{Interface:Mouse}";
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{sBack}"; mControllerButtons.mB = "#{Interface:Back}";
mControllerButtons.mY = "#{sSex}"; mControllerButtons.mY = "#{sSex}";
mControllerButtons.mL1 = "#{sHair}"; mControllerButtons.mL1 = "#{sHair}";
mControllerButtons.mR1 = "#{sFace}"; mControllerButtons.mR1 = "#{sFace}";
@ -130,13 +130,13 @@ namespace MWGui
{ {
okButton->setCaption( okButton->setCaption(
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {}))); MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
mControllerButtons.mX = "#{sNext}"; mControllerButtons.mX = "#{Interface:Next}";
} }
else if (Settings::gui().mControllerMenus) else if (Settings::gui().mControllerMenus)
{ {
okButton->setCaption( okButton->setCaption(
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sDone", {}))); MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sDone", {})));
mControllerButtons.mX = "#{sDone}"; mControllerButtons.mX = "#{Interface:Done}";
} }
else else
okButton->setCaption( okButton->setCaption(

View File

@ -42,7 +42,7 @@ namespace MWGui
mControllerButtons.mA = "#{OMWEngine:RechargeSelect}"; mControllerButtons.mA = "#{OMWEngine:RechargeSelect}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
mControllerButtons.mY = "#{sSoulGem}"; mControllerButtons.mY = "#{Interface:Soul}";
} }
void Recharge::onOpen() void Recharge::onOpen()

View File

@ -123,9 +123,9 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
setControllerFocus(mButtons, mControllerFocus, true); setControllerFocus(mButtons, mControllerFocus, true);
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{sBack}"; mControllerButtons.mB = "#{Interface:Back}";
mControllerButtons.mX = "#{sDone}"; mControllerButtons.mX = "#{Interface:Done}";
okButton->setCaption( okButton->setCaption(
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sDone", {}))); MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sDone", {})));
} }

View File

@ -67,7 +67,7 @@ namespace MWGui
// To avoid accidental deletions // To avoid accidental deletions
mDeleteButton->setNeedKeyFocus(false); mDeleteButton->setNeedKeyFocus(false);
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
} }

View File

@ -130,7 +130,10 @@ namespace MWGui
ControllerButtons* ScrollWindow::getControllerButtons() ControllerButtons* ScrollWindow::getControllerButtons()
{ {
mControllerButtons.mA = mTakeButton->getVisible() ? "#{sTake}" : ""; if (mTakeButton->getVisible())
mControllerButtons.mA = "#{Interface:Take}";
else
mControllerButtons.mA.clear();
return &mControllerButtons; return &mControllerButtons;
} }

View File

@ -452,9 +452,9 @@ namespace MWGui
i++; i++;
} }
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:OK}"; mControllerButtons.mB = "#{Interface:OK}";
mControllerButtons.mLStick = "#{sMouse}"; mControllerButtons.mLStick = "#{Interface:Mouse}";
} }
void SettingsWindow::onTabChanged(MyGUI::TabControl* /*sender*/, size_t /*index*/) void SettingsWindow::onTabChanged(MyGUI::TabControl* /*sender*/, size_t /*index*/)

View File

@ -38,9 +38,9 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mDisableGamepadCursor = true; mDisableGamepadCursor = true;
mControllerButtons.mA = "#{sBuy}"; mControllerButtons.mA = "#{Interface:Buy}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
mControllerButtons.mR3 = "#{sInfo}"; mControllerButtons.mR3 = "#{Interface:Info}";
} }
} }

View File

@ -100,7 +100,7 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
mControllerButtons.mX = "#{Interface:OK}"; mControllerButtons.mX = "#{Interface:OK}";
} }
@ -599,10 +599,10 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
mControllerButtons.mX = "#{sBuy}"; mControllerButtons.mX = "#{Interface:Buy}";
mControllerButtons.mR3 = "#{sInfo}"; mControllerButtons.mR3 = "#{Interface:Info}";
} }
} }

View File

@ -62,9 +62,9 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
setPinButtonVisible(false); setPinButtonVisible(false);
mControllerButtons.mA = "#{sSelect}"; mControllerButtons.mA = "#{Interface:Select}";
mControllerButtons.mB = "#{sBack}"; mControllerButtons.mB = "#{Interface:Back}";
mControllerButtons.mR3 = "#{sInfo}"; mControllerButtons.mR3 = "#{Interface:Info}";
} }
} }

View File

@ -84,9 +84,9 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
setPinButtonVisible(false); setPinButtonVisible(false);
mControllerButtons.mLStick = "#{sMouse}"; mControllerButtons.mLStick = "#{Interface:Mouse}";
mControllerButtons.mRStick = "#{sScrolldown}"; mControllerButtons.mRStick = "#{sScrolldown}";
mControllerButtons.mB = "#{sBack}"; mControllerButtons.mB = "#{Interface:Back}";
} }
onWindowResize(t); onWindowResize(t);

View File

@ -188,11 +188,11 @@ namespace MWGui
image->setImageTexture(MWBase::Environment::get().getInputManager()->getControllerButtonIcon( image->setImageTexture(MWBase::Environment::get().getInputManager()->getControllerButtonIcon(
SDL_CONTROLLER_BUTTON_RIGHTSHOULDER)); SDL_CONTROLLER_BUTTON_RIGHTSHOULDER));
mControllerButtons.mA = "#{sBuy}"; mControllerButtons.mA = "#{Interface:Buy}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
mControllerButtons.mX = "#{sOffer}"; mControllerButtons.mX = "#{sOffer}";
mControllerButtons.mR3 = "#{sInfo}"; mControllerButtons.mR3 = "#{Interface:Info}";
mControllerButtons.mL2 = "#{sInventory}"; mControllerButtons.mL2 = "#{Interface:Inventory}";
} }
} }

View File

@ -40,7 +40,7 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mDisableGamepadCursor = true; mDisableGamepadCursor = true;
mControllerButtons.mA = "#{sBuy}"; mControllerButtons.mA = "#{Interface:Buy}";
mControllerButtons.mB = "#{Interface:Cancel}"; mControllerButtons.mB = "#{Interface:Cancel}";
} }
} }