diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-04 15:39:24 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-04 15:39:24 (GMT) |
| commit | f2f4278932e0752c22d15185ce70198077d0b5fd (patch) | |
| tree | d53cc28ba9a9020fc851fb3d89803a52a7d06436 /src/dialogues/TextPrompt.cpp | |
| parent | 055832270979cdb027c0c30a74cf82c23df13689 (diff) | |
| download | powder-f2f4278932e0752c22d15185ce70198077d0b5fd.zip powder-f2f4278932e0752c22d15185ce70198077d0b5fd.tar.gz | |
Better exiting from windows (Escape and Enter) and 'q' for exit, fixes #35 and #60
Diffstat (limited to 'src/dialogues/TextPrompt.cpp')
| -rw-r--r-- | src/dialogues/TextPrompt.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dialogues/TextPrompt.cpp b/src/dialogues/TextPrompt.cpp index 9db8176..d5b6c95 100644 --- a/src/dialogues/TextPrompt.cpp +++ b/src/dialogues/TextPrompt.cpp @@ -60,6 +60,7 @@ TextPrompt::TextPrompt(std::string title, std::string message, bool multiline, T cancelButton->Appearance.BorderInactive = ui::Colour(200, 200, 200); cancelButton->SetActionCallback(new CloseAction(this, ResultCancel)); AddComponent(cancelButton); + SetCancelButton(cancelButton); ui::Button * okayButton = new ui::Button(ui::Point(Size.X/2, Size.Y-16), ui::Point(Size.X/2, 16), "Okay"); okayButton->Appearance.HorizontalAlign = ui::Appearance::AlignRight; @@ -67,6 +68,7 @@ TextPrompt::TextPrompt(std::string title, std::string message, bool multiline, T okayButton->Appearance.TextInactive = style::Colour::WarningTitle; okayButton->SetActionCallback(new CloseAction(this, ResultOkay)); AddComponent(okayButton); + SetOkayButton(okayButton); ui::Engine::Ref().ShowWindow(this); } |
