File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ namespace MWGui
240240 else if (arg.button == SDL_CONTROLLER_BUTTON_B)
241241 {
242242 onCancelButtonClicked (mCancelButton );
243+ return true ;
243244 }
244245 else if (arg.button == SDL_CONTROLLER_BUTTON_RIGHTSTICK)
245246 {
@@ -271,6 +272,8 @@ namespace MWGui
271272 else
272273 return true ;
273274
275+ winMgr->setCursorVisible (!winMgr->getControllerTooltipVisible ());
276+
274277 if (mControllerFocus < mSpellButtons .size ())
275278 {
276279 // Scroll the list to keep the active item in view
Original file line number Diff line number Diff line change @@ -847,10 +847,12 @@ namespace MWGui
847847 mAvailableFocus = 0 ;
848848 mEffectFocus = 0 ;
849849 mRightColumn = false ;
850- if (mAvailableButtons .size () > 0 )
850+ if (! mAvailableButtons .empty () )
851851 {
852+ MWBase::WindowManager& winMgr = *MWBase::Environment::get ().getWindowManager ();
853+ winMgr.setCursorVisible (!winMgr.getControllerTooltipVisible ());
852854 mAvailableButtons [0 ]->setStateSelected (true );
853- if (MWBase::Environment::get (). getWindowManager ()-> getControllerTooltipVisible ())
855+ if (winMgr. getControllerTooltipVisible ())
854856 MWBase::Environment::get ().getInputManager ()->warpMouseToWidget (mAvailableButtons [0 ]);
855857 }
856858 }
@@ -1117,6 +1119,8 @@ namespace MWGui
11171119 else
11181120 return true ;
11191121
1122+ winMgr->setCursorVisible (!winMgr->getControllerTooltipVisible ());
1123+
11201124 // Scroll the list to keep the active item in view
11211125 if (mAvailableFocus <= 5 )
11221126 mAvailableEffectsList ->setViewOffset (0 );
Original file line number Diff line number Diff line change @@ -417,6 +417,9 @@ namespace MWGui
417417
418418 void SpellView::updateControllerFocus (size_t prevFocus, size_t newFocus)
419419 {
420+ MWBase::Environment::get ().getWindowManager ()->setCursorVisible (
421+ !MWBase::Environment::get ().getWindowManager ()->getControllerTooltipVisible ());
422+
420423 if (mButtons .empty ())
421424 return ;
422425
You can’t perform that action at this time.
0 commit comments