mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
Savegame dialog: Set key focus to editbox
This commit is contained in:
parent
ec46575671
commit
1deb0a7cdf
@ -281,6 +281,7 @@ namespace MWBase
|
||||
|
||||
virtual const Translation::Storage& getTranslationDataStorage() const = 0;
|
||||
|
||||
/// Warning: do not use MyGUI::InputManager::setKeyFocusWidget directly. Instead use this.
|
||||
virtual void setKeyFocusWidget (MyGUI::Widget* widget) = 0;
|
||||
|
||||
virtual Loading::Listener* getLoadingScreen() = 0;
|
||||
|
@ -235,7 +235,7 @@ namespace MWGui
|
||||
|
||||
mItemView->setModel (mSortModel);
|
||||
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(mCloseButton);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mCloseButton);
|
||||
|
||||
// Careful here. setTitle may cause size updates, causing itemview redraw, so make sure to do it last
|
||||
// or we end up using a possibly invalid model.
|
||||
|
@ -332,7 +332,7 @@ namespace MWGui
|
||||
{
|
||||
if(Misc::StringUtils::ciEqual((*button)->getCaption(), ok))
|
||||
{
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(*button);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(*button);
|
||||
(*button)->eventKeyButtonPressed += MyGUI::newDelegate(this, &InteractiveMessageBox::onKeyPressed);
|
||||
break;
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ namespace MWGui
|
||||
WindowModal::open();
|
||||
|
||||
mSaveNameEdit->setCaption ("");
|
||||
if (mSaving)
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mSaveNameEdit);
|
||||
|
||||
center();
|
||||
|
||||
@ -130,7 +132,7 @@ namespace MWGui
|
||||
|
||||
void SaveGameDialog::accept(bool reallySure)
|
||||
{
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
|
||||
// Get the selected slot, if any
|
||||
unsigned int i=0;
|
||||
|
@ -105,6 +105,7 @@ namespace MWGui
|
||||
*/
|
||||
virtual void update();
|
||||
|
||||
/// Warning: do not use MyGUI::InputManager::setKeyFocusWidget directly. Instead use this.
|
||||
virtual void setKeyFocusWidget (MyGUI::Widget* widget);
|
||||
|
||||
virtual void setNewGame(bool newgame);
|
||||
|
@ -251,8 +251,6 @@ namespace MWInput
|
||||
|
||||
mInputManager->capture(loading);
|
||||
// inject some fake mouse movement to force updating MyGUI's widget states
|
||||
// this shouldn't do any harm since we're moving back to the original position afterwards
|
||||
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX+1), int(mMouseY+1), mMouseWheel);
|
||||
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX), int(mMouseY), mMouseWheel);
|
||||
|
||||
// update values of channels (as a result of pressed keys)
|
||||
|
Loading…
Reference in New Issue
Block a user