mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-04 01:51:38 +00:00
Savegame dialog: Set key focus to editbox
This commit is contained in:
parent
ec46575671
commit
1deb0a7cdf
6 changed files with 7 additions and 5 deletions
|
@ -281,6 +281,7 @@ namespace MWBase
|
||||||
|
|
||||||
virtual const Translation::Storage& getTranslationDataStorage() const = 0;
|
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 void setKeyFocusWidget (MyGUI::Widget* widget) = 0;
|
||||||
|
|
||||||
virtual Loading::Listener* getLoadingScreen() = 0;
|
virtual Loading::Listener* getLoadingScreen() = 0;
|
||||||
|
|
|
@ -235,7 +235,7 @@ namespace MWGui
|
||||||
|
|
||||||
mItemView->setModel (mSortModel);
|
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
|
// 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.
|
// or we end up using a possibly invalid model.
|
||||||
|
|
|
@ -332,7 +332,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
if(Misc::StringUtils::ciEqual((*button)->getCaption(), ok))
|
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);
|
(*button)->eventKeyButtonPressed += MyGUI::newDelegate(this, &InteractiveMessageBox::onKeyPressed);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,8 @@ namespace MWGui
|
||||||
WindowModal::open();
|
WindowModal::open();
|
||||||
|
|
||||||
mSaveNameEdit->setCaption ("");
|
mSaveNameEdit->setCaption ("");
|
||||||
|
if (mSaving)
|
||||||
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mSaveNameEdit);
|
||||||
|
|
||||||
center();
|
center();
|
||||||
|
|
||||||
|
@ -130,7 +132,7 @@ namespace MWGui
|
||||||
|
|
||||||
void SaveGameDialog::accept(bool reallySure)
|
void SaveGameDialog::accept(bool reallySure)
|
||||||
{
|
{
|
||||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(NULL);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||||
|
|
||||||
// Get the selected slot, if any
|
// Get the selected slot, if any
|
||||||
unsigned int i=0;
|
unsigned int i=0;
|
||||||
|
|
|
@ -105,6 +105,7 @@ namespace MWGui
|
||||||
*/
|
*/
|
||||||
virtual void update();
|
virtual void update();
|
||||||
|
|
||||||
|
/// Warning: do not use MyGUI::InputManager::setKeyFocusWidget directly. Instead use this.
|
||||||
virtual void setKeyFocusWidget (MyGUI::Widget* widget);
|
virtual void setKeyFocusWidget (MyGUI::Widget* widget);
|
||||||
|
|
||||||
virtual void setNewGame(bool newgame);
|
virtual void setNewGame(bool newgame);
|
||||||
|
|
|
@ -251,8 +251,6 @@ namespace MWInput
|
||||||
|
|
||||||
mInputManager->capture(loading);
|
mInputManager->capture(loading);
|
||||||
// inject some fake mouse movement to force updating MyGUI's widget states
|
// 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);
|
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX), int(mMouseY), mMouseWheel);
|
||||||
|
|
||||||
// update values of channels (as a result of pressed keys)
|
// update values of channels (as a result of pressed keys)
|
||||||
|
|
Loading…
Reference in a new issue