Unified · Split
| @@ -8,6 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #include <keyboard.h> |
| 9 | 9 | #include <thread.h> |
| 10 | 10 | #include <plumb.h> |
| 11 | +#include <cursor.h> | |
| 11 | 12 | |
| 12 | 13 | #define MIN(x,y) ((x)<=(y)?(x):(y)) |
| 13 | 14 | #define MAX(x,y) ((x)>=(y)?(x):(y)) |
| @@ -103,6 +104,20 @@ static Snap *snaps; · 89 unmodified lines | ||
| 103 | 104 | static int numsnaps, nextsnap; |
| 104 | 105 | static int maxsnaps = 100; |
| 105 | 106 | |
| 107 | +Cursor quitcursor = { | |
| 108 | + {0, 0}, | |
| 109 | + { 0xf7, 0xfe, 0x15, 0x54, 0x1d, 0x54, 0x09, 0x54, | |
| 110 | + 0x09, 0xdc, 0x00, 0x00, 0x75, 0x77, 0x45, 0x54, | |
| 111 | + 0x75, 0x66, 0x15, 0x54, 0x77, 0x57, 0x00, 0x00, | |
| 112 | + 0x00, 0x02, 0x2a, 0x84, 0x11, 0x28, 0x2a, 0x90, | |
| 113 | + }, | |
| 114 | + { 0xea, 0x2b, 0xea, 0xab, 0xe2, 0xab, 0xf6, 0xab, | |
| 115 | + 0xf6, 0x23, 0xff, 0xff, 0x8a, 0x88, 0xba, 0xab, | |
| 116 | + 0x8a, 0x99, 0xea, 0xab, 0x88, 0xa8, 0xff, 0xff, | |
| 117 | + 0xff, 0xfd, 0xd5, 0x7b, 0xee, 0xd7, 0xd5, 0x6f, | |
| 118 | + }, | |
| 119 | +}; | |
| 120 | + | |
| 106 | 121 | static struct { |
| 107 | 122 | struct { |
| 108 | 123 | char *menu; |
| @@ -1575,7 +1590,16 @@ noredraw: · 1466 unmodified lines | ||
| 1575 | 1590 | } else if (n == Menu3colors) { |
| 1576 | 1591 | proccreate(colorsproc, nil, mainstacksize); |
| 1577 | 1592 | } else if (n == Menu3exit) { |
| 1578 | − goto end; | |
| 1593 | + setcursor(mctl, &quitcursor); | |
| 1594 | + for (;;) { | |
| 1595 | + if (recv(mctl->c, &m) == 1) { | |
| 1596 | + if (m.buttons == 4) | |
| 1597 | + goto end; | |
| 1598 | + if (m.buttons) | |
| 1599 | + break; | |
| 1600 | + } | |
| 1601 | + } | |
| 1602 | + setcursor(mctl, nil); | |
| 1579 | 1603 | } |
| 1580 | 1604 | complete = true; |
| 1581 | 1605 | } else { |