Several tweaks to the inventory menu

This commit is contained in:
Andrew Lanzone 2025-05-31 16:02:13 -07:00
parent 6185683ca3
commit 5276d7bab2
3 changed files with 7 additions and 9 deletions

View File

@ -29,13 +29,15 @@ namespace MWGui
void InventoryTabsOverlay::onTabClicked(MyGUI::Widget* sender)
{
if (!MWBase::Environment::get().getWindowManager()->getJournalAllowed())
return;
for (int i = 0; i < mTabs.size(); i++)
{
if (mTabs[i] == sender)
{
Log(Debug::Verbose) << "InventoryTabsOverlay::onTabClicked " << i;
MWBase::Environment::get().getWindowManager()->setActiveControllerWindow(GM_Inventory, i);
//setTab(i);
setTab(i);
break;
}
}

View File

@ -84,7 +84,7 @@ namespace MWGui
if (Settings::gui().mControllerMenus)
{
setPinButtonVisible(false);
mControllerButtons.lStick = "#{sInfo}";
mControllerButtons.lStick = "#{sMouse}";
mControllerButtons.rStick = "#{sScrolldown}";
mControllerButtons.b = "#{sBack}";
}

View File

@ -514,6 +514,7 @@ namespace MWGui
auto inventoryTabsOverlay = std::make_unique<InventoryTabsOverlay>();
mInventoryTabsOverlay = inventoryTabsOverlay.get();
mWindows.push_back(std::move(inventoryTabsOverlay));
mActiveControllerWindows[GM_Inventory] = 1; // Start on Inventory page
mInputBlocker = MyGUI::Gui::getInstance().createWidget<MyGUI::Widget>(
{}, 0, 0, w, h, MyGUI::Align::Stretch, "InputBlocker");
@ -927,12 +928,7 @@ namespace MWGui
for (int i = 0; i < winCount; i++)
{
activeIndex += delta;
if (activeIndex < 0)
activeIndex = winCount - 1;
else if (activeIndex >= winCount)
activeIndex = 0;
activeIndex = wrap(activeIndex + delta, winCount);
if (mGuiModeStates[mode].mWindows[activeIndex]->isVisible())
break;
}