summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-15 14:16:46 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-15 14:16:46 (GMT)
commit8a4d18df49f6dbc22b3c1b87c19cc7e6eca5837b (patch)
tree74fb2784f63073081587c86397bbd918d6bae7d5 /src
parent3ed56720529fa86fe19615f9be5656ec01892f5a (diff)
downloadpowder-8a4d18df49f6dbc22b3c1b87c19cc7e6eca5837b.zip
powder-8a4d18df49f6dbc22b3c1b87c19cc7e6eca5837b.tar.gz
Better reporting dialogue
Diffstat (limited to 'src')
-rw-r--r--src/dialogues/TextPrompt.cpp15
-rw-r--r--src/preview/PreviewView.cpp2
2 files changed, 12 insertions, 5 deletions
diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp
index 68333d1..3566fb1 100644
--- a/src/dialogues/TextPrompt.cpp
+++ b/src/dialogues/TextPrompt.cpp
@@ -28,20 +28,27 @@ public:
};
TextPrompt::TextPrompt(std::string title, std::string message, std::string text, std::string placeholder, bool multiline, TextDialogueCallback * callback_):
- ui::Window(ui::Point(-1, -1), ui::Point(200, 80)),
+ ui::Window(ui::Point(-1, -1), ui::Point(200, 65)),
callback(callback_)
{
+ if(multiline)
+ Size.X += 100;
+
ui::Label * titleLabel = new ui::Label(ui::Point(4, 5), ui::Point(Size.X-8, 18), title);
titleLabel->SetTextColour(style::Colour::WarningTitle);
titleLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
titleLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
AddComponent(titleLabel);
- ui::Label * messageLabel = new ui::Label(ui::Point(4, 25), ui::Point(Size.X-8, 16), message);
- messageLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; messageLabel->Appearance.VerticalAlign = ui::Appearance::AlignTop;
+ 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);
- textField = new ui::Textbox(ui::Point(4, 45 ), ui::Point(Size.X-8, 16), text, placeholder);
+ Size.Y += messageLabel->Size.Y+4;
+
+ textField = new ui::Textbox(ui::Point(4, messageLabel->Position.Y + messageLabel->Size.Y + 7), ui::Point(Size.X-8, 16), text, placeholder);
if(multiline)
{
textField->SetMultiline(true);
diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp
index 0bc4ae0..7e824e1 100644
--- a/src/preview/PreviewView.cpp
+++ b/src/preview/PreviewView.cpp
@@ -96,7 +96,7 @@ PreviewView::PreviewView():
ReportAction(PreviewView * v_){ v = v_; }
virtual void ActionCallback(ui::Button * sender)
{
- new TextPrompt("Report Save", "Reason for reporting", "", "[reason]", true, new ReportPromptCallback(v));
+ new TextPrompt("Report Save", "Things to consider when reporting:\n\bw1)\bg When reporting stolen saves, please include the ID of the original save.\n\bw2)\bg Do not waste staff time with fake or bogus reports, doing so may result in a ban.", "", "[reason]", true, new ReportPromptCallback(v));
}
};
reportButton = new ui::Button(ui::Point(100, Size.Y-19), ui::Point(51, 19), "Report");