← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/block_dummy_scenario into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/block_dummy_scenario into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/block_dummy_scenario/+merge/275563

Disable OK button while the dummy campaign scenario is selected.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/block_dummy_scenario into lp:widelands.
=== modified file 'src/ui_fsmenu/campaign_select.cc'
--- src/ui_fsmenu/campaign_select.cc	2015-10-02 07:02:00 +0000
+++ src/ui_fsmenu/campaign_select.cc	2015-10-23 18:19:27 +0000
@@ -432,6 +432,11 @@
 			m_ta_description.set_text(_(map.get_description()));
 		}
 		m_ta_description.scroll_to_top();
+
+		// The dummy scenario can't be played, so we disable the OK button.
+		if (campmapfile == "campaigns/dummy.wmf") {
+			ok_.set_enabled(false);
+		}
 	}
 }
 


Follow ups