How can we add scrolling to editor 2.1 (#185)? We need to update scrollX and scrollX as soon as the cursor moves out of the screen. So it's something like this: if curX < scrollX then scrollX = curX end if curY < scrollY then scrollY = curY end if curX >= scrollX+displayCols then scrollX = curX-displayCols end if curY >= scrollY+displayRows then scrollY = curY-displayRows end Now we just insert that at the appropriate place in the source, and we're done. Note: Did it, see #192 (now also automatically included in #185).
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 549 | [visualize] |
| Snippet ID: | #191 |
| Snippet name: | Scrolling for editor |
| Eternal ID of this version: | #191/1 |
| Text MD5: | 9dd20c6c924f92bc6b553ac7a35d9bef |
| Author: | stefan |
| Category: | |
| Type: | Document |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2014-01-19 02:15:10 |
| Source code size: | 549 bytes / 12 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1059 / 249 |
| Referenced in: | [show references] |