MCPcopy Create free account
hub / github.com/NetHack/NetHack / Scroll

Method Scroll

outdated/win/Qt3/qt3_win.cpp:1584–1594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1582}
1583
1584void NetHackQtMapWindow::Scroll(int dx, int dy)
1585{
1586 if (viewport.horizontalScrollBar()->isVisible()) {
1587 while (dx<0) { viewport.horizontalScrollBar()->subtractPage(); dx++; }
1588 while (dx>0) { viewport.horizontalScrollBar()->addPage(); dx--; }
1589 }
1590 if (viewport.verticalScrollBar()->isVisible()) {
1591 while (dy<0) { viewport.verticalScrollBar()->subtractPage(); dy++; }
1592 while (dy>0) { viewport.verticalScrollBar()->addPage(); dy--; }
1593 }
1594}
1595
1596void NetHackQtMapWindow::Clear()
1597{

Callers 1

keyPressEventMethod · 0.45

Calls 2

horizontalScrollBarMethod · 0.80
verticalScrollBarMethod · 0.80

Tested by

no test coverage detected