| 506 | |
| 507 | |
| 508 | void CellEngine::ForceOnScreen() |
| 509 | { |
| 510 | int hangout; |
| 511 | int xx = x; |
| 512 | int yy = y; |
| 513 | int ww = idealWidth; |
| 514 | int hh = idealHeight; |
| 515 | int ww2 = width; |
| 516 | int hh2 = height; |
| 517 | |
| 518 | hangout = (xx + ww2) - screenWidth; |
| 519 | if (hangout > 0) { |
| 520 | xx -= hangout; |
| 521 | } |
| 522 | hangout = (yy + hh2) - screenHeight; |
| 523 | if (hangout > 0) { |
| 524 | yy -= hangout; |
| 525 | } |
| 526 | hangout = -xx; |
| 527 | if (hangout > 0) { |
| 528 | xx += hangout; |
| 529 | } |
| 530 | hangout = -yy; |
| 531 | if (hangout > 0) { |
| 532 | yy -= hangout; |
| 533 | } |
| 534 | if ((xx + ww2) > screenWidth) { |
| 535 | ww = screenWidth - xx; |
| 536 | } |
| 537 | if ((yy + hh2) > screenHeight) { |
| 538 | hh = screenHeight - yy; |
| 539 | } |
| 540 | |
| 541 | SetRect(xx, yy, ww, hh); |
| 542 | } |
| 543 | |
| 544 | |
| 545 | long CellEngine::OnScreen() |
nothing calls this directly
no outgoing calls
no test coverage detected