Improve consistency of error messages, use InformationMessage instead of ErrorMessage
This commit is contained in:
parent
4ec4b32021
commit
0c972469b8
@ -293,7 +293,7 @@ void GameController::PlaceSave(ui::Point position)
|
|||||||
void GameController::Install()
|
void GameController::Install()
|
||||||
{
|
{
|
||||||
#if defined(MACOSX)
|
#if defined(MACOSX)
|
||||||
new InformationMessage("No Installation necessary", "You don't need to install The Powder Toy on Mac OS X", false);
|
new InformationMessage("No installation necessary", "You don't need to install The Powder Toy on OS X", false);
|
||||||
#elif defined(WIN) || defined(LIN)
|
#elif defined(WIN) || defined(LIN)
|
||||||
class InstallConfirmation: public ConfirmDialogueCallback {
|
class InstallConfirmation: public ConfirmDialogueCallback {
|
||||||
public:
|
public:
|
||||||
@ -304,7 +304,7 @@ void GameController::Install()
|
|||||||
{
|
{
|
||||||
if(Client::Ref().DoInstallation())
|
if(Client::Ref().DoInstallation())
|
||||||
{
|
{
|
||||||
new InformationMessage("Install Success", "The installation completed!", false);
|
new InformationMessage("Success", "Installation completed", false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -140,7 +140,7 @@ void PropertyWindow::SetProperty()
|
|||||||
}
|
}
|
||||||
if (property->GetOption().first == "type" && (v < 0 || v >= PT_NUM || !sim->elements[v].Enabled))
|
if (property->GetOption().first == "type" && (v < 0 || v >= PT_NUM || !sim->elements[v].Enabled))
|
||||||
{
|
{
|
||||||
new ErrorMessage("Could not set property", "Invalid Particle Type");
|
new ErrorMessage("Could not set property", "Invalid particle type");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ OptionsView::OptionsView():
|
|||||||
{
|
{
|
||||||
#ifdef USE_SDL
|
#ifdef USE_SDL
|
||||||
#if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 15)
|
#if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 15)
|
||||||
ErrorMessage::Blocking("Error", "fullscreen doesn't work on OS X");
|
ErrorMessage::Blocking("Information", "Fullscreen doesn't work on OS X");
|
||||||
#else
|
#else
|
||||||
v->c->SetFullscreen(sender->GetChecked());
|
v->c->SetFullscreen(sender->GetChecked());
|
||||||
#endif
|
#endif
|
||||||
@ -317,4 +317,3 @@ void OptionsView::OnTryExit(ExitMethod method)
|
|||||||
|
|
||||||
OptionsView::~OptionsView() {
|
OptionsView::~OptionsView() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "PreviewView.h"
|
#include "PreviewView.h"
|
||||||
#include "PreviewModel.h"
|
#include "PreviewModel.h"
|
||||||
#include "PreviewModelException.h"
|
#include "PreviewModelException.h"
|
||||||
|
#include "gui/dialogues/InformationMessage.h"
|
||||||
#include "gui/dialogues/ErrorMessage.h"
|
#include "gui/dialogues/ErrorMessage.h"
|
||||||
#include "gui/login/LoginController.h"
|
#include "gui/login/LoginController.h"
|
||||||
#include "Controller.h"
|
#include "Controller.h"
|
||||||
@ -82,7 +83,7 @@ bool PreviewController::SubmitComment(std::string comment)
|
|||||||
RequestStatus status = Client::Ref().AddComment(saveId, comment);
|
RequestStatus status = Client::Ref().AddComment(saveId, comment);
|
||||||
if(status != RequestOkay)
|
if(status != RequestOkay)
|
||||||
{
|
{
|
||||||
new ErrorMessage("Error Submitting comment", Client::Ref().GetLastError());
|
new ErrorMessage("Error submitting comment", Client::Ref().GetLastError());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -125,10 +126,10 @@ void PreviewController::Report(std::string message)
|
|||||||
if(Client::Ref().ReportSave(saveId, message) == RequestOkay)
|
if(Client::Ref().ReportSave(saveId, message) == RequestOkay)
|
||||||
{
|
{
|
||||||
Exit();
|
Exit();
|
||||||
new ErrorMessage("Information", "Report submitted"); //TODO: InfoMessage
|
new InformationMessage("Information", "Report submitted", false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
new ErrorMessage("Error", "Unable file report: " + Client::Ref().GetLastError());
|
new ErrorMessage("Error", "Unable to file report: " + Client::Ref().GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewController::FavouriteSave()
|
void PreviewController::FavouriteSave()
|
||||||
@ -197,4 +198,3 @@ PreviewController::~PreviewController() {
|
|||||||
delete previewView;
|
delete previewView;
|
||||||
delete callback;
|
delete callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user