Author: fendrin
Date: Thu Mar 3 14:34:48 2011
New Revision: 48730
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48730&view=rev
Log:
input_message class is ready.
Modified:
trunk/src/gui/dialogs/image_message/image_message.hpp
trunk/src/gui/dialogs/image_message/input_message.cpp
trunk/src/gui/dialogs/image_message/input_message.hpp
Modified: trunk/src/gui/dialogs/image_message/image_message.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/image_message/image_message.hpp?rev=48730&r1=48729&r2=48730&view=diff
==============================================================================
--- trunk/src/gui/dialogs/image_message/image_message.hpp (original)
+++ trunk/src/gui/dialogs/image_message/image_message.hpp Thu Mar 3 14:34:48
2011
@@ -59,11 +59,10 @@
/** Mirror the portrait? */
bool mirror_;
+protected:
/** Inherited from tdialog. */
void pre_show(CVideo& video, twindow& window);
- /** Inherited from tdialog. */
- void post_show(twindow& window);
};
/** Shows a dialog with the portrait on the left side. */
@@ -88,7 +87,7 @@
public:
timage_message_right(const std::string& title, const std::string&
message,
const std::string& portrait, const bool mirror)
- : twml_message_(title, message, portrait, mirror)
+ : timage_message_(title, message, portrait, mirror)
{
}
Modified: trunk/src/gui/dialogs/image_message/input_message.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/image_message/input_message.cpp?rev=48730&r1=48729&r2=48730&view=diff
==============================================================================
--- trunk/src/gui/dialogs/image_message/input_message.cpp (original)
+++ trunk/src/gui/dialogs/image_message/input_message.cpp Thu Mar 3 14:34:48
2011
@@ -15,7 +15,7 @@
#define GETTEXT_DOMAIN "wesnoth-lib"
-#include "gui/dialogs/wml_message.hpp"
+#include "gui/dialogs/image_message/input_message.hpp"
#include "foreach.hpp"
#include "gui/dialogs/helper.hpp"
@@ -28,24 +28,15 @@
namespace gui2 {
-void tinput_message_::set_input(const std::string& caption,
- std::string* text, const unsigned maximum_length)
-{
- assert(text);
-
- input_caption_ = caption;
- input_text_ = text;
- input_maximum_lenght_ = maximum_length;
-}
-
/**
* @todo This function enables the wml markup for all items, but the interface
* is a bit hacky. Especially the fiddling in the internals of the listbox is
* ugly. There needs to be a clean interface to set whether a widget has a
* markup and what kind of markup. These fixes will be post 1.6.
*/
-void tinput_message_::pre_show(CVideo& /*video*/, twindow& window)
+void tinput_message_::pre_show(CVideo& video, twindow& window)
{
+ timage_message_::pre_show(video, window);
// Find the input box related fields.
tlabel& caption = find_widget<tlabel>(&window, "input_caption", false);
ttext_box& input = find_widget<ttext_box>(&window, "input", true);
Modified: trunk/src/gui/dialogs/image_message/input_message.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/image_message/input_message.hpp?rev=48730&r1=48729&r2=48730&view=diff
==============================================================================
--- trunk/src/gui/dialogs/image_message/input_message.hpp (original)
+++ trunk/src/gui/dialogs/image_message/input_message.hpp Thu Mar 3 14:34:48
2011
@@ -33,11 +33,7 @@
tinput_message_(const std::string& title, const std::string& message,
const std::string& portrait, const bool mirror,
const std::string& caption, std::string* text, const
unsigned maximum_length)
- : title_(title)
- , image_("")
- , message_(message)
- , portrait_(portrait)
- , mirror_(mirror)
+ : timage_message_(title, message, portrait, mirror)
, input_caption_(caption)
, input_text_(text)
, input_maximum_lenght_(maximum_length)
@@ -67,8 +63,9 @@
{
public:
tinput_message_left(const std::string& title, const std::string&
message,
- const std::string& portrait, const bool mirror)
- : tinput_message_(title, message, portrait, mirror)
+ const std::string& portrait, const bool mirror,
+ const std::string& caption, std::string* text, const
unsigned maximum_length)
+ : tinput_message_(title, message, portrait, mirror, caption,
text, maximum_length)
{
}
@@ -83,8 +80,9 @@
{
public:
tinput_message_right(const std::string& title, const std::string&
message,
- const std::string& portrait, const bool mirror)
- : tinput_message_(title, message, portrait, mirror)
+ const std::string& portrait, const bool mirror,
+ const std::string& caption, std::string* text, const
unsigned maximum_length)
+ : tinput_message_(title, message, portrait, mirror, caption,
text, maximum_length)
{
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits