summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-06 01:03:59 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-06 01:03:59 (GMT)
commit8f4d936de81c15e1ba91a2a4a2e79e039707a121 (patch)
tree97a68b4b28ded9f88d912886c227e073d2e9bbf8 /src
parentbd3011959a936f3b1f6e8cbe744529ea6c171182 (diff)
downloadpowder-8f4d936de81c15e1ba91a2a4a2e79e039707a121.zip
powder-8f4d936de81c15e1ba91a2a4a2e79e039707a121.tar.gz
allow right click to close notifications too
Diffstat (limited to 'src')
-rw-r--r--src/game/EllipseBrush.h7
-rw-r--r--src/game/GameView.cpp4
2 files changed, 7 insertions, 4 deletions
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<ui::Component*>::const_iterator iter = notificationComponents.begin(), end = notificationComponents.end(); iter != end; ++iter) {