diff options
Diffstat (limited to 'source/UI')
-rw-r--r-- | source/UI/Window.cpp | 4 | ||||
-rw-r--r-- | source/UI/Window.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/UI/Window.cpp b/source/UI/Window.cpp index 661f9f62f..f353d0721 100644 --- a/source/UI/Window.cpp +++ b/source/UI/Window.cpp @@ -251,7 +251,7 @@ void cWindow::OpenedByPlayer(cPlayer & a_Player) -void cWindow::ClosedByPlayer(cPlayer & a_Player) +bool cWindow::ClosedByPlayer(cPlayer & a_Player) { // Checks whether the player is still holding an item if (a_Player.IsDraggingItem()) @@ -285,6 +285,8 @@ void cWindow::ClosedByPlayer(cPlayer & a_Player) { delete this; } + + return true; } diff --git a/source/UI/Window.h b/source/UI/Window.h index 1f2495a46..68774aa59 100644 --- a/source/UI/Window.h +++ b/source/UI/Window.h @@ -106,7 +106,9 @@ public: ); void OpenedByPlayer(cPlayer & a_Player); - void ClosedByPlayer(cPlayer & a_Player); + + /// Called when a player closes this window; notifies all slot areas. Returns true if close accepted + virtual bool ClosedByPlayer(cPlayer & a_Player); void SendWholeWindow(cClientHandle & a_Client); void BroadcastWholeWindow(void); |