summaryrefslogtreecommitdiff
path: root/src/save/ServerSaveActivity.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-16 00:32:39 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-16 00:32:39 (GMT)
commit2267f3438689e195b38b0f05c8321c713ffd0932 (patch)
tree23b765fb8ceaa4a726b6f13d99738b2c5243031d /src/save/ServerSaveActivity.cpp
parentcd8ea8ad0eb1e8af28c25a75dd2a15bc94c357c4 (diff)
downloadpowder-2267f3438689e195b38b0f05c8321c713ffd0932.zip
powder-2267f3438689e195b38b0f05c8321c713ffd0932.tar.gz
add a button to show the save uploading rules inside the save upload dialog
Diffstat (limited to 'src/save/ServerSaveActivity.cpp')
-rw-r--r--src/save/ServerSaveActivity.cpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/save/ServerSaveActivity.cpp b/src/save/ServerSaveActivity.cpp
index 94d609a..f4ec27e 100644
--- a/src/save/ServerSaveActivity.cpp
+++ b/src/save/ServerSaveActivity.cpp
@@ -6,6 +6,7 @@
#include "client/requestbroker/RequestBroker.h"
#include "dialogues/ErrorMessage.h"
#include "dialogues/ConfirmPrompt.h"
+#include "dialogues/InformationMessage.h"
#include "client/Client.h"
#include "tasks/Task.h"
#include "Style.h"
@@ -33,6 +34,17 @@ public:
}
};
+class ServerSaveActivity::RulesAction: public ui::ButtonAction
+{
+ ServerSaveActivity * a;
+public:
+ RulesAction(ServerSaveActivity * a) : a(a) {}
+ virtual void ActionCallback(ui::Button * sender)
+ {
+ a->ShowRules();
+ }
+};
+
class SaveUploadTask: public Task
{
SaveInfo save;
@@ -130,6 +142,14 @@ ServerSaveActivity::ServerSaveActivity(SaveInfo save, ServerSaveActivity::SaveUp
AddComponent(okayButton);
SetOkayButton(okayButton);
+ //Position.X+(Size.X/2)+((Size.X/2)-thumbnail->Width)/2, Position.Y+25, thumbnail->Width, thumbnail->Height
+ ui::Button * RulesButton = new ui::Button(ui::Point((Size.X*3/4)-75, Size.Y-20), ui::Point(150, 16), "Save Uploading Rules");
+ RulesButton->Appearance.HorizontalAlign = ui::Appearance::AlignCentre;
+ RulesButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
+ RulesButton->Appearance.TextInactive = style::Colour::InformationTitle;
+ RulesButton->SetActionCallback(new RulesAction(this));
+ AddComponent(RulesButton);
+
if(save.GetGameSave())
RequestBroker::Ref().RenderThumbnail(save.GetGameSave(), false, true, (Size.X/2)-16, -1, this);
}
@@ -189,7 +209,7 @@ void ServerSaveActivity::Save()
{
if(Client::Ref().GetAuthUser().Username != save.GetUserName() && publishedCheckbox->GetChecked())
{
- new ConfirmPrompt("Publish", "This save was created by " + save.GetUserName() + ", you're about to publish this under your own name; If you haven't been given permission by the author to do so, please untick the publish box, otherwise continue", new PublishConfirmation(this));
+ new ConfirmPrompt("Publish", "This save was created by " + save.GetUserName() + ", you're about to publish this under your own name; If you haven't been given permission by the author to do so, please uncheck the publish box, otherwise continue", new PublishConfirmation(this));
}
else
{
@@ -227,6 +247,30 @@ void ServerSaveActivity::Exit()
WindowActivity::Exit();
}
+void ServerSaveActivity::ShowRules()
+{
+ const char *rules =
+ "These are the rules you should follow when uploading saves. They may change at any time as new problems arise, and how each rule is handled changes depending on the situation.\n"
+ "\n"
+ "\bt1. No image plotting.\bw If you use a program to draw out pixels from an image outside of TPT without drawing it by hand, then don't be surprised when it gets deleted and you get banned.\n"
+ "\bt2. No self voting.\bw This means making more than one account, and then using that account to vote on any save multiple times. We can see this stuff, and people get banned for doing this. Don't do it.\n"
+ "\bt3. No hate saves.\bw This means things like shooting Jews or killing Beiber, these will not be allowed.\n"
+ "\bt4. No penis drawings.\bw Or any other explicit or non-explicit sex please. We like to think this is a game that kids can play, don't post anything too inappropriate for children.\n"
+ "\bt5. Don't ask people to vote.\bw If your stuff is awesome, you shouldn't have to beg for popularity to make it so. People tend to downvote when they see a lot of vote begging anyway.\n"
+ "- This includes vote signs in the game, drawings of vote arrows, and comments on the save telling people to vote up.\n"
+ "- Gimmicks for getting votes like '100 votes and I'll make a better version' are similarly frowned upon.\n"
+ "\bt6. Keep the number of logos and signs to a minimum.\bw They not only slow the game down, but it makes saves unappealing for people to use. \n"
+ "\bt7. Please don't swear excessively.\bw Saves containing excessive swearing or rude language will be unpublished. Don't make rude or offensive comments either.\n"
+ "\bt8. Don't make text only saves.\bw Saves are much better when they actually use some of the features in the game. Text only saves will be removed from the front page if they should get there.\n"
+ "- This also relates to art on the front page. Art saves that rely only on the deco layer are generally removed. Other art using elements may stay longer if they are more impressive.\n"
+ "\bt9. Don't claim other's work as your own.\bw If you didn't make it, don't resave it for yourself. You can fav. a save if you want to see it later instead of publishing a copy.\n"
+ "- This doesn't mean you can't modify or improve saves, building on the works of others in encouraged. If you give credit to the original author, it is usually ok to do resave unless the author specifically prohibits it.\n"
+ "\n"
+ "You can report a save breaking any one of these rules, the moderators are busy in real life too and don't always have the time to search through all the saves for these kinds of things. If reporting a copied save, just give the id of the original, but if not an id isn't needed.";
+
+ new InformationMessage("Save Uploading Rules", rules, true);
+}
+
void ServerSaveActivity::OnTick(float dt)
{
if(saveUploadTask)