From 935ea2219d2870cd0d3b5295d421eb69b3d62e01 Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Sun, 27 Mar 2022 01:20:24 -0400 Subject: [PATCH] Add arrow key mouse movement to 32BitPaint, reassign canvas clear key to End. --- src/Demo/Graphics/32BitPaint.ZC | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Demo/Graphics/32BitPaint.ZC b/src/Demo/Graphics/32BitPaint.ZC index 6f10a86b..eaa2b86d 100755 --- a/src/Demo/Graphics/32BitPaint.ZC +++ b/src/Demo/Graphics/32BitPaint.ZC @@ -163,7 +163,7 @@ I0 Paint32() "$$BLUE$$Ctrl-S$$FG$$ to save image.\n" "$$BLUE$$Ctrl-L$$FG$$ to load image.\n\n" "$$GREEN$$Left-click or SPACE$$FG$$ to draw.\n\n" - "$$RED$$ENTER$$FG$$ to clear image.\n" + "$$RED$$END$$FG$$ to clear image.\n" "$$RED$$Shift-Esc or Double Right-Click$$FG$$ to exit."); Sleep(250); // help ensure SPACE press doesn't draw early @@ -215,17 +215,25 @@ I0 Paint32() break; case SC_CURSOR_LEFT: + mouse.pos.x--; break; case SC_CURSOR_RIGHT: + mouse.pos.x++; break; case SC_CURSOR_UP: + mouse.pos.y--; break; case SC_CURSOR_DOWN: + mouse.pos.y++; break; + case SC_END: + MemSet(paint.fb, WHITE32, text.buffer_size); + MemSet(text.fb_alias, WHITE32, text.buffer_size); + break; } break; @@ -260,11 +268,6 @@ I0 Paint32() paint.color = gr_palette[ch - '0']; break; - case '\n': - MemSet(paint.fb, WHITE32, text.buffer_size); - MemSet(text.fb_alias, WHITE32, text.buffer_size); - break; - case CH_CTRLS: PaintSaveImage; break;