Overview
| Comment: | Correct the scrollbars to work like that in xterm and other programs |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
2c47558bbb0d45f7f90ca47bd2a83abd |
| User & Date: | user on 2020-12-25 06:19:29.260 |
| Other Links: | manifest | tags |
Context
|
2020-12-28
| ||
| 22:23 | Fix the Missile animations by not disabling visual animation when no logical animation is active check-in: 89831418e9 user: user tags: trunk | |
|
2020-12-25
| ||
| 06:19 | Correct the scrollbars to work like that in xterm and other programs check-in: 2c47558bbb user: user tags: trunk | |
|
2020-12-22
| ||
| 08:31 | Add a man page check-in: 2d8aa29ceb user: user tags: trunk | |
Changes
Modified picture.c
from [e314be6a7b]
to [ba28d43d0a].
| ︙ | ︙ | |||
491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
int scrollbar(int*cur,int page,int max,SDL_Event*ev,SDL_Rect*re) {
int x0=re?re->x:0;
int y0=re?re->y:0;
int x1=re?re->x+12:12;
int y1=re?re->y+re->h:screen->h;
int y;
double f;
switch(ev?ev->type:SDL_VIDEOEXPOSE) {
case SDL_MOUSEMOTION:
if(ev->motion.x<x0 || ev->motion.x>x1 || ev->motion.y<y0 || ev->motion.y>=y1) return 0;
if(ev->motion.state&SDL_BUTTON(2)) {
y=ev->motion.y;
goto move;
} else if(ev->motion.state&SDL_BUTTON(1)) {
| > > | 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
int scrollbar(int*cur,int page,int max,SDL_Event*ev,SDL_Rect*re) {
int x0=re?re->x:0;
int y0=re?re->y:0;
int x1=re?re->x+12:12;
int y1=re?re->y+re->h:screen->h;
int y;
double f;
max-=page;
if(max<0) max=0;
switch(ev?ev->type:SDL_VIDEOEXPOSE) {
case SDL_MOUSEMOTION:
if(ev->motion.x<x0 || ev->motion.x>x1 || ev->motion.y<y0 || ev->motion.y>=y1) return 0;
if(ev->motion.state&SDL_BUTTON(2)) {
y=ev->motion.y;
goto move;
} else if(ev->motion.state&SDL_BUTTON(1)) {
|
| ︙ | ︙ |