MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setSelectorPosition

Method setSelectorPosition

src/Battlescape/Map.cpp:1178–1188  ·  view source on GitHub ↗

* Sets the selector to a certain tile on the map. * @param mx mouse x position. * @param my mouse y position. */

Source from the content-addressed store, hash-verified

1176 * @param my mouse y position.
1177 */
1178void Map::setSelectorPosition(int mx, int my)
1179{
1180 int oldX = _selectorX, oldY = _selectorY;
1181
1182 _camera->convertScreenToMap(mx, my + _spriteHeight/4, &_selectorX, &_selectorY);
1183
1184 if (oldX != _selectorX || oldY != _selectorY)
1185 {
1186 _redraw = true;
1187 }
1188}
1189
1190/**
1191 * Handles animating tiles. 8 Frames per animation.

Callers 2

handleMethod · 0.80
stopScrollingMethod · 0.80

Calls 1

convertScreenToMapMethod · 0.80

Tested by

no test coverage detected