mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-12 18:54:47 +00:00
Make the restore of the window background conditionally.
This commit is contained in:
parent
bafcd9cdb5
commit
be54f822a0
@ -45,7 +45,7 @@ void tdialog::show(CVideo& video)
|
||||
|
||||
pre_show(video, window);
|
||||
|
||||
retval_ = window.show(true);
|
||||
retval_ = window.show(restore_);
|
||||
|
||||
if(retval_ == twindow::OK) {
|
||||
finalize_fields(window);
|
||||
|
@ -37,7 +37,8 @@ class tdialog
|
||||
public:
|
||||
tdialog() :
|
||||
retval_(0),
|
||||
fields_()
|
||||
fields_(),
|
||||
restore_(true)
|
||||
{}
|
||||
|
||||
virtual ~tdialog();
|
||||
@ -45,8 +46,12 @@ public:
|
||||
/** 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 @@ private:
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user