summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-03 12:58:59 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-03 12:58:59 (GMT)
commitc996d01228f37f3f59b7157deb6e4c695a9654df (patch)
treef5b42e4fb8b4c2e7c41b20de19a6f588cc6e7ce4 /src
parente5f96cd3c97833bea60e562e810cc9c66e018172 (diff)
downloadpowder-c996d01228f37f3f59b7157deb6e4c695a9654df.zip
powder-c996d01228f37f3f59b7157deb6e4c695a9654df.tar.gz
Make update notification a little better - correct colour. Correct multiline label for Confirm prompt
Diffstat (limited to 'src')
-rw-r--r--src/Graphics.cpp6
-rw-r--r--src/Graphics.h3
-rw-r--r--src/dialogues/ConfirmPrompt.cpp1
-rw-r--r--src/game/GameController.cpp2
-rw-r--r--src/game/GameView.cpp7
5 files changed, 16 insertions, 3 deletions
diff --git a/src/Graphics.cpp b/src/Graphics.cpp
index 3b88adb..5f84088 100644
--- a/src/Graphics.cpp
+++ b/src/Graphics.cpp
@@ -738,11 +738,17 @@ void Graphics::draw_icon(int x, int y, Icon icon)
drawchar(x, y, 0x8C, 160, 144, 32, 255);
drawchar(x, y, 0x84, 255, 255, 255, 255);
break;
+ case IconClose:
+ drawchar(x, y, 0xAA, 230, 230, 230, 255);
+ break;
case IconVoteSort:
case IconDateSort:
case IconFolder:
case IconSearch:
case IconDelete:
+ drawchar(x, y, 0x86, 255, 55, 55, 255);
+ drawchar(x, y, 0x85, 255, 255, 255, 255);
+ break;
default:
drawchar(x, y, 't', 255, 255, 255, 255);
break;
diff --git a/src/Graphics.h b/src/Graphics.h
index 8c019e1..1209b86 100644
--- a/src/Graphics.h
+++ b/src/Graphics.h
@@ -79,7 +79,8 @@ enum Icon
IconDelete,
IconReport,
IconUsername,
- IconPassword
+ IconPassword,
+ IconClose
};
//"Graphics lite" - slightly lower performance due to variable size,
diff --git a/src/dialogues/ConfirmPrompt.cpp b/src/dialogues/ConfirmPrompt.cpp
index 30b94a8..93ef06a 100644
--- a/src/dialogues/ConfirmPrompt.cpp
+++ b/src/dialogues/ConfirmPrompt.cpp
@@ -23,6 +23,7 @@ ConfirmPrompt::ConfirmPrompt(std::string title, std::string message, ConfirmDial
ui::Label * messageLabel = new ui::Label(ui::Point(4, 25), ui::Point(Size.X-8, -1), message);
+ messageLabel->SetMultiline(true);
messageLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
messageLabel->Appearance.VerticalAlign = ui::Appearance::AlignTop;
AddComponent(messageLabel);
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 5c5c928..8ece34b 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -681,7 +681,7 @@ void GameController::NotifyUpdateAvailable(Client * sender)
}
};
- gameModel->AddNotification(new UpdateNotification(this, "An Update is available"));
+ gameModel->AddNotification(new UpdateNotification(this, "A new version is available - click here to download"));
}
void GameController::RemoveNotification(Notification * notification)
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 7d3e0c9..085433f 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -2,6 +2,7 @@
#include <iomanip>
#include "Config.h"
+#include "Style.h"
#include "GameView.h"
#include "Graphics.h"
#include "interface/Window.h"
@@ -988,12 +989,16 @@ void GameView::NotifyNotificationsChanged(GameModel * sender)
int width = (Graphics::textwidth((*iter)->Message.c_str()))+8;
ui::Button * tempButton = new ui::Button(ui::Point(XRES-width-22, currentY), ui::Point(width, 15), (*iter)->Message);
tempButton->SetActionCallback(new NotificationButtonAction(this, *iter));
+ tempButton->Appearance.BorderInactive = style::Colour::WarningTitle;
+ tempButton->Appearance.TextInactive = style::Colour::WarningTitle;
AddComponent(tempButton);
notificationComponents.push_back(tempButton);
tempButton = new ui::Button(ui::Point(XRES-20, currentY), ui::Point(15, 15));
- tempButton->SetIcon(IconDelete);
+ tempButton->SetIcon(IconClose);
tempButton->SetActionCallback(new CloseNotificationButtonAction(this, *iter));
+ tempButton->Appearance.BorderInactive = style::Colour::WarningTitle;
+ tempButton->Appearance.TextInactive = style::Colour::WarningTitle;
AddComponent(tempButton);
notificationComponents.push_back(tempButton);