Commit d69ac95d authored by fallenstardust's avatar fallenstardust

fix hiding element

parent 95559763
...@@ -1104,14 +1104,11 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) { ...@@ -1104,14 +1104,11 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
btnCardDisplay[i]->setDrawImage(false); btnCardDisplay[i]->setDrawImage(false);
} }
win->setRelativePosition(irr::core::recti(center.X, center.Y, 0, 0)); win->setRelativePosition(irr::core::recti(center.X, center.Y, 0, 0));
win->setVisible(true);
fadingList.push_back(fu); fadingList.push_back(fu);
} }
void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) { void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
bool fading = false; if(!win->isVisible() && !set_action)
for(auto fit = fadingList.begin(); fit != fadingList.end(); ++fit)
if(win == fit->guiFading)
fading = true;
if(!win->isVisible() && !set_action && !fading)
return; return;
FadingUnit fu; FadingUnit fu;
fu.fadingSize = win->getRelativePosition(); fu.fadingSize = win->getRelativePosition();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment