| 319 | } |
| 320 | |
| 321 | void Minimap::ForcePosition() |
| 322 | { |
| 323 | float width, height, scale; |
| 324 | scale = 1 / TheSynth->GetUIScale(); |
| 325 | GetDimensions(width, height); |
| 326 | const int margin = static_cast<int>(UserPrefs.minimap_margin.Get()); |
| 327 | switch (UserPrefs.minimap_corner.GetIndex()) |
| 328 | { |
| 329 | default: |
| 330 | case static_cast<int>(MinimapCorner::TopRight): |
| 331 | mX = floor((ofGetWidth() * scale) - (width + margin)); |
| 332 | mY = margin + TheTitleBar->GetRect().height; |
| 333 | break; |
| 334 | case static_cast<int>(MinimapCorner::TopLeft): |
| 335 | mX = margin; |
| 336 | mY = margin + TheTitleBar->GetRect().height; |
| 337 | break; |
| 338 | case static_cast<int>(MinimapCorner::BottomRight): |
| 339 | mX = floor((ofGetWidth() * scale) - (width + margin)); |
| 340 | mY = floor((ofGetHeight() * scale) - (height + margin)); |
| 341 | break; |
| 342 | case static_cast<int>(MinimapCorner::BottomLeft): |
| 343 | mX = margin; |
| 344 | mY = floor((ofGetHeight() * scale) - (height + margin)); |
| 345 | break; |
| 346 | } |
| 347 | } |
nothing calls this directly
no test coverage detected