diff --git a/changelog b/changelog index 89bba305dc9..2f423a1d47d 100644 --- a/changelog +++ b/changelog @@ -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) diff --git a/src/game_events.cpp b/src/game_events.cpp index e5c24662bb9..c4236ffa53f 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -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){