From b9bce435416b053a9a786c3c228093ed6f77371d Mon Sep 17 00:00:00 2001 From: Alisson Nunes Date: Tue, 16 May 2017 09:14:03 -0300 Subject: [PATCH] Resolvido: crash ao mudar o tamanho da tela durante o jogo --- Source/include/eventmanager.h | 1 + Source/include/freecell.h | 1 + Source/src/eventmanager.cpp | 3 +++ 3 files changed, 5 insertions(+) diff --git a/Source/include/eventmanager.h b/Source/include/eventmanager.h index fa73e45..6baf272 100644 --- a/Source/include/eventmanager.h +++ b/Source/include/eventmanager.h @@ -44,6 +44,7 @@ class EventManager { void mouseLeftDown(); void mouseLeftUp(); void addLogo(Textura*); + void clearLogo(); void addStack(PilhaInteligente*); void clearStacks(); void addButton(Button*); diff --git a/Source/include/freecell.h b/Source/include/freecell.h index e9f200c..d90b32e 100644 --- a/Source/include/freecell.h +++ b/Source/include/freecell.h @@ -138,6 +138,7 @@ void FreeCell::menu() { } this->event.clearButtons(); + this->event.clearLogo(); } void FreeCell::setupItens() { diff --git a/Source/src/eventmanager.cpp b/Source/src/eventmanager.cpp index 0e81651..e6f5ae0 100644 --- a/Source/src/eventmanager.cpp +++ b/Source/src/eventmanager.cpp @@ -298,6 +298,9 @@ void EventManager::mouseLeftUp() { void EventManager::addLogo(Textura * logo) { this->logo = logo; } +void EventManager::clearLogo() { + this->logo = nullptr; +} void EventManager::addStack(PilhaInteligente * stack) { this->stacks.push(stack, abc);