added [scroll_to] as per patch 3388 (resurrected from Won't Fix)

This commit is contained in:
András Salamon 2005-05-25 16:29:59 +00:00
parent 2ce1f078fb
commit 7c7ed788ec
2 changed files with 7 additions and 0 deletions

View file

@ -79,6 +79,7 @@ CVS HEAD:
* new [random] representation as list allows complex scenarios to be saved
(forum thread 5659)
* better diagnostics on parsing: file inclusion sequence
* added [scroll_to] (patch #3388, forum thread 3235)
* editor improvements:
* fixed editor file chooser when starting directory has many files (#11698)
* made the starting position in editor start at player 1 (#10625)

View file

@ -417,6 +417,12 @@ bool event_handler::handle_event_command(const queued_event& event_info,
screen->draw(true,true);
}
else if(cmd == "scroll_to") {
const int xpos = atoi(cfg["x"].c_str());
const int ypos = atoi(cfg["y"].c_str());
screen->scroll_to_tile(xpos,ypos);
}
else if(cmd == "scroll_to_unit") {
unit_map::const_iterator u;
for(u = units->begin(); u != units->end(); ++u){