~rabbits/oekaki

d89da4a1d472e49b44c14f1ebeb39731fb249845 — neauoire 6 months ago 6b0b494
Hold alt to drag canvas without changing tool
1 files changed, 4 insertions(+), 3 deletions(-)

M src/oekaki.tal
M src/oekaki.tal => src/oekaki.tal +4 -3
@@ 99,7 99,9 @@
	<draw-pointer>
	.Mouse/state DEI #00 NEQ [ LIT &last $1 ] OVR ,&last STR
	( fn* ) #10 SFT ORA #10 SFT
	( tool ) .brush/tool LDZ #30 SFT ADD
	( tool ) .brush/tool LDZ
	( alt override ) .Controller/button DEI #02 NEQ ?{ POP #03 }
	#30 SFT ADD
	( load ) #00 SWP ;tools ADD2 LDA2 JSR2 BRK

@on-mouse-menu ( -> )


@@ 219,8 221,7 @@
		.Mouse/y DEI2 ,&y STR2
		( set origin ) JMP2r
	&up ( -- )
		( x ) .Mouse/x DEI2 ,&x LDR2 SUB2
		( y ) .Mouse/y DEI2 ,&y LDR2 SUB2 !<redraw-all>
		!<redraw-all>
	&drag ( -- )
		.Mouse/x DEI2
		( ) DUP2 [ LIT2 &x $2 ] SUB2 .canvas/x LDZ2 ADD2 .canvas/x STZ2