Author: mordante
Date: Sat May 23 11:05:14 2009
New Revision: 35842

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35842&view=rev
Log:
Export the wrap to WML.

Modified:
    trunk/src/gui/auxiliary/window_builder.cpp
    trunk/src/gui/auxiliary/window_builder_private.hpp

Modified: trunk/src/gui/auxiliary/window_builder.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/auxiliary/window_builder.cpp?rev=35842&r1=35841&r2=35842&view=diff
==============================================================================
--- trunk/src/gui/auxiliary/window_builder.cpp (original)
+++ trunk/src/gui/auxiliary/window_builder.cpp Sat May 23 11:05:14 2009
@@ -689,11 +689,32 @@
 {
 }
 
+tbuilder_label::tbuilder_label(const config& cfg)
+       : tbuilder_control(cfg)
+       , wrap(utils::string_bool("wrap"))
+{
+/*WIKI
+ * @page = GUIWidgetInstanceWML
+ * @order = 2_label
+ *
+ * == Label ==
+ *
+ * Instance of a label.
+ *
+ * List with the label specific variables:
+ * @start_table = config
+ *     wrap (bool = false)        Is wrapping enabled for the label.
+ * @end_table
+ */
+}
+
 twidget* tbuilder_label::build() const
 {
        tlabel* tmp_label = new tlabel();
 
        init_control(tmp_label);
+
+       tmp_label->set_can_wrap(wrap);
 
        DBG_GUI_G << "Window builder: placed label '" << id << "' with 
defintion '"
                << definition << "'.\n";

Modified: trunk/src/gui/auxiliary/window_builder_private.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/auxiliary/window_builder_private.hpp?rev=35842&r1=35841&r2=35842&view=diff
==============================================================================
--- trunk/src/gui/auxiliary/window_builder_private.hpp (original)
+++ trunk/src/gui/auxiliary/window_builder_private.hpp Sat May 23 11:05:14 2009
@@ -132,21 +132,11 @@
 private:
        tbuilder_label();
 public:
-/*WIKI
- * @page = GUIWidgetInstanceWML
- * @order = 2_label
- *
- * == Label ==
- *
- * A label has no special fields.
- *
- */
-       tbuilder_label(const config& cfg) :
-               tbuilder_control(cfg)
-       {}
-
-       twidget* build () const;
-
+       tbuilder_label(const config& cfg);
+
+       twidget* build () const;
+
+       bool wrap;
 };
 
 struct tbuilder_listbox : public tbuilder_control


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to