Add scroll_to_leader attribute to side tag,
...to control start-of-turn scroll to leader. Default value is 'yes' (bug #15921). Patch #1665 by kevg.
This commit is contained in:
parent
a0b16aa089
commit
b1b1a8d724
5 changed files with 12 additions and 1 deletions
|
@ -88,6 +88,8 @@ Version 1.9.0-svn:
|
|||
* Prototype support for [set_global_variable]
|
||||
* Prototype support for [get_global_variable]
|
||||
* Prototype support for [clear_global_variable]
|
||||
* Added scroll_to_leader attribute to side tag.
|
||||
Default value is 'yes' (bug #15921)
|
||||
* Miscellaneous and bug fixes:
|
||||
* Defaulted log level to warning again
|
||||
* New option to auto-set delay shroud update on game start
|
||||
|
|
|
@ -863,6 +863,9 @@
|
|||
comment = "Lua AI"
|
||||
ircuser = "pokhbocee"
|
||||
[/entry]
|
||||
[entry]
|
||||
name = "Eugene Kosov (kevg)"
|
||||
[/entry]
|
||||
[entry]
|
||||
name = "FAAB"
|
||||
[/entry]
|
||||
|
|
|
@ -570,7 +570,7 @@ void play_controller::do_init_side(const unsigned int team_index){
|
|||
gui_->invalidate_all();
|
||||
}
|
||||
|
||||
if (!recorder.is_skipping() && !skip_replay_){
|
||||
if (!recorder.is_skipping() && !skip_replay_ && current_team.get_scroll_to_leader()){
|
||||
gui_->scroll_to_leader(units_, player_number_,game_display::ONSCREEN,false);
|
||||
}
|
||||
loading_game_ = false;
|
||||
|
|
|
@ -65,6 +65,7 @@ team::team_info::team_info(const config& cfg) :
|
|||
flag(cfg["flag"]),
|
||||
flag_icon(cfg["flag_icon"]),
|
||||
description(cfg["id"]),
|
||||
scroll_to_leader(utils::string_bool(cfg["scroll_to_leader"],true)),
|
||||
objectives(cfg["objectives"]),
|
||||
objectives_changed(utils::string_bool(cfg["objectives_changed"])),
|
||||
controller(),
|
||||
|
@ -198,6 +199,7 @@ void team::team_info::write(config& cfg) const
|
|||
cfg["allow_player"] = allow_player;
|
||||
cfg["no_leader"] = no_leader;
|
||||
cfg["hidden"] = hidden;
|
||||
cfg["scroll_to_leader"] = scroll_to_leader;
|
||||
|
||||
switch(controller) {
|
||||
case AI: cfg["controller"] = "ai"; break;
|
||||
|
|
|
@ -86,6 +86,8 @@ public:
|
|||
|
||||
std::string description;
|
||||
|
||||
bool scroll_to_leader;
|
||||
|
||||
t_string objectives; /** < Team's objectives for the current level. */
|
||||
|
||||
/** Set to true when the objectives for this time changes.
|
||||
|
@ -153,6 +155,8 @@ public:
|
|||
|
||||
int average_recruit_price() const;
|
||||
|
||||
bool get_scroll_to_leader() const {return info_.scroll_to_leader;}
|
||||
|
||||
const std::set<std::string>& recruits() const
|
||||
{ return info_.can_recruit; }
|
||||
void add_recruit(const std::string &);
|
||||
|
|
Loading…
Add table
Reference in a new issue