From 8f4d936de81c15e1ba91a2a4a2e79e039707a121 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 5 Jan 2013 20:03:59 -0500 Subject: allow right click to close notifications too diff --git a/src/game/EllipseBrush.h b/src/game/EllipseBrush.h index d6c8b40..80215b5 100644 --- a/src/game/EllipseBrush.h +++ b/src/game/EllipseBrush.h @@ -36,16 +36,15 @@ public: } else { - int yTop = ry, i, j, yBottom; + int yTop = ry, yBottom, i, j; for (i = 0; i <= rx; i++) { while (pow(i-rx,2.0f)*pow(ry,2.0f) + pow(yTop-ry,2.0f)*pow(rx,2.0f) <= pow(rx,2.0f)*pow(ry,2.0f)) - yTop = yTop + 1; - yTop = yTop - 1; + yTop++; yBottom = 2*ry - yTop; for (int j = 0; j <= ry*2; j++) { - if (j >= yBottom && j <= yTop) + if (j > yBottom && j < yTop) { bitmap[j*(size.X)+i] = 255; bitmap[j*(size.X)+2*rx-i] = 255; diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index dfd4b40..a1bbc9e 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -1591,6 +1591,10 @@ void GameView::NotifyNotificationsChanged(GameModel * sender) { v->c->RemoveNotification(notification); } + void AltActionCallback(ui::Button * sender) + { + v->c->RemoveNotification(notification); + } }; for(std::vector::const_iterator iter = notificationComponents.begin(), end = notificationComponents.end(); iter != end; ++iter) { -- cgit v0.9.2-21-gd62e