diff --git a/Minecraft.Client/Common/UI/UIControl.h b/Minecraft.Client/Common/UI/UIControl.h index 9062ce9ba..8445af0fc 100644 --- a/Minecraft.Client/Common/UI/UIControl.h +++ b/Minecraft.Client/Common/UI/UIControl.h @@ -64,10 +64,8 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); void UpdateControl(); -#ifdef __PSVITA__ void setHidden(bool bHidden) {m_bHidden=bHidden;} bool getHidden(void) {return m_bHidden;} -#endif IggyValuePath *getIggyValuePath(); diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 1d69c6e10..f059d8211 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -865,7 +865,7 @@ void UIController::tickInput() for (size_t i = 0; i < controls->size(); ++i) { UIControl *ctrl = (*controls)[i]; - if (!ctrl || !ctrl->getVisible() || ctrl->getId() < 0) + if (!ctrl || ctrl->getHidden() || !ctrl->getVisible() || ctrl->getId() < 0) continue; UIControl::eUIControlType type = ctrl->getControlType(); diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index dc5c9d8fc..0aedbf18f 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -478,7 +478,7 @@ bool UIScene::handleMouseClick(F32 x, F32 y) for (size_t i = 0; i < controls->size(); ++i) { UIControl *ctrl = (*controls)[i]; - if (!ctrl || !ctrl->getVisible() || ctrl->getId() < 0) + if (!ctrl || ctrl->getHidden() || !ctrl->getVisible() || ctrl->getId() < 0) continue; UIControl::eUIControlType type = ctrl->getControlType(); @@ -607,12 +607,13 @@ void UIScene::removeControl( UIControl_Base *control, bool centreScene) // update the button positions since they may have changed UpdateSceneControls(); - // mark the button as removed - control->setHidden(true); // remove it from the touchboxes ui.TouchBoxRebuild(control->getParentScene()); #endif + // mark the button as removed so hover/touch hit-tests skip it + control->setHidden(true); + } void UIScene::slideLeft()