mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 07:19:54 +00:00
Fixed mouse closing containers, and injection/gui test order
Called setEnabled on channels now effects whether those channels notify listeners, rather than whether they register changes to their controls. This was making channels get stuck on "1" when the GUI was activated. Also ensured GUI activity can invalidate player controls even if that activity is closing the GUI, by re-ordering a check. And fixed a comment.
This commit is contained in:
parent
1d3a220d94
commit
cd693b6d37
2 changed files with 6 additions and 9 deletions
|
@ -569,10 +569,10 @@ namespace MWInput
|
|||
{
|
||||
bool guiMode = false;
|
||||
|
||||
if (id == SDL_BUTTON_LEFT || id == SDL_BUTTON_RIGHT) // MyGUI has no use for these events
|
||||
if (id == SDL_BUTTON_LEFT || id == SDL_BUTTON_RIGHT) // MyGUI only uses these mouse events
|
||||
{
|
||||
MyGUI::InputManager::getInstance().injectMousePress(mMouseX, mMouseY, sdlButtonToMyGUI(id));
|
||||
guiMode = guiMode && MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||
guiMode = MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||
guiMode = MyGUI::InputManager::getInstance().injectMousePress(mMouseX, mMouseY, sdlButtonToMyGUI(id)) && guiMode;
|
||||
if (MyGUI::InputManager::getInstance ().getMouseFocusWidget () != 0)
|
||||
{
|
||||
MyGUI::Button* b = MyGUI::InputManager::getInstance ().getMouseFocusWidget ()->castType<MyGUI::Button>(false);
|
||||
|
@ -596,8 +596,8 @@ namespace MWInput
|
|||
{
|
||||
mInputBinder->mouseReleased (arg, id);
|
||||
} else {
|
||||
bool guiMode = MyGUI::InputManager::getInstance().injectMouseRelease(mMouseX, mMouseY, sdlButtonToMyGUI(id));
|
||||
guiMode = guiMode && MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||
bool guiMode = MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||
guiMode = MyGUI::InputManager::getInstance().injectMouseRelease(mMouseX, mMouseY, sdlButtonToMyGUI(id)) && guiMode;
|
||||
|
||||
if(mInputBinder->detectingBindingState()) return; // don't allow same mouseup to bind as initiated bind
|
||||
|
||||
|
|
5
extern/oics/ICSChannel.cpp
vendored
5
extern/oics/ICSChannel.cpp
vendored
|
@ -84,7 +84,7 @@ namespace ICS
|
|||
|
||||
mValue = value;
|
||||
|
||||
if(previousValue != value)
|
||||
if(previousValue != value && mEnabled)
|
||||
{
|
||||
notifyListeners(previousValue);
|
||||
}
|
||||
|
@ -130,9 +130,6 @@ namespace ICS
|
|||
|
||||
void Channel::update()
|
||||
{
|
||||
if(!mEnabled)
|
||||
return;
|
||||
|
||||
if(this->getControlsCount() == 1)
|
||||
{
|
||||
ControlChannelBinderItem ccBinderItem = mAttachedControls.back();
|
||||
|
|
Loading…
Reference in a new issue