Author: mordante
Date: Sun Aug 24 20:25:23 2008
New Revision: 28943
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28943&view=rev
Log:
Make the restore of the window background conditionally.
Modified:
trunk/src/gui/dialogs/dialog.cpp
trunk/src/gui/dialogs/dialog.hpp
Modified: trunk/src/gui/dialogs/dialog.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/dialog.cpp?rev=28943&r1=28942&r2=28943&view=diff
==============================================================================
--- trunk/src/gui/dialogs/dialog.cpp (original)
+++ trunk/src/gui/dialogs/dialog.cpp Sun Aug 24 20:25:23 2008
@@ -45,7 +45,7 @@
pre_show(video, window);
- retval_ = window.show(true);
+ retval_ = window.show(restore_);
if(retval_ == twindow::OK) {
finalize_fields(window);
Modified: trunk/src/gui/dialogs/dialog.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/dialog.hpp?rev=28943&r1=28942&r2=28943&view=diff
==============================================================================
--- trunk/src/gui/dialogs/dialog.hpp (original)
+++ trunk/src/gui/dialogs/dialog.hpp Sun Aug 24 20:25:23 2008
@@ -37,7 +37,8 @@
public:
tdialog() :
retval_(0),
- fields_()
+ fields_(),
+ restore_(true)
{}
virtual ~tdialog();
@@ -45,7 +46,11 @@
/** Shows the window */
void show(CVideo& video);
+ /***** ***** ***** setters / getters for members ***** ****** *****/
+
int get_retval() const { return retval_; }
+
+ void set_restore(const bool restore) { restore_ = restore; }
protected:
@@ -106,6 +111,15 @@
*/
std::vector<tfield_*> fields_;
+ /**
+ * Restore the screen after showing?
+ *
+ * Most windows should restore the display after showing so this value
+ * defaults to true. Toplevel windows (like the titlescreen don't want
this
+ * behaviour so they can change it in pre_show().
+ */
+ bool restore_;
+
/**
* Builds the window.
*
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits