Starting notepad

This commit is contained in:
Devine Lu Linvega 2023-04-25 21:20:12 -07:00
parent b0b3573d7d
commit e9ca23660a
9 changed files with 138 additions and 0 deletions

27
gui/notepad/build.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh -e
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
ID="notepad"
SRC="${ID}.tal"
DST="${ID}.rom"
CPY="$HOME/roms"
ARG=""
if [[ "$*" == *"--lint"* ]]
then
$LIN $SRC
fi
$ASM $SRC $DST
if [[ "$*" == *"--save"* ]]
then
cp $DST $CPY
fi
$EMU $DST $ARG

BIN
gui/notepad/cursor.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
gui/notepad/cursor01x02.icn Normal file

Binary file not shown.

BIN
gui/notepad/head.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
gui/notepad/head08x02.icn Normal file

Binary file not shown.

BIN
gui/notepad/head09x02.icn Normal file

Binary file not shown.

BIN
gui/notepad/head0ax02.icn Normal file

Binary file not shown.

111
gui/notepad/notepad.tal Normal file
View File

@ -0,0 +1,111 @@
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|10 @Console &vector $2 &read $1 &pad $5 &write $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|80 @Controller &vector $2 &button $1 &key $1
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|0100
( theme )
#f00f .System/r DEO2
#f00f .System/g DEO2
#f00f .System/b DEO2
( size )
#00e0 .Screen/width DEO2
#00f4 .Screen/height DEO2
( unlock )
;on-console .Console/vector DEO2
;on-mouse .Mouse/vector DEO2
draw-header
BRK
@on-console ( -> )
BRK
@on-mouse ( -> )
BRK
(
@|drawing )
@draw-header ( -- )
#0000
DUP2 .Screen/x DEO2
.Screen/y DEO2
( a )
#15 .Screen/auto DEO
;bar-icn/a .Screen/addr DEO2
#01 .Screen/sprite DEO
( close )
;close-icn/default .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO
( lead )
#e9 &l
;bar-icn/b .Screen/addr DEO2
#01 .Screen/sprite DEO
INC DUP ?&l
POP
;bar-icn/b .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO
( title )
#004b .Screen/x DEO2
#86 .Screen/auto DEO
;title-icn .Screen/addr DEO2
#01 .Screen/sprite DEOk DEO
( line )
#d2 .Screen/auto DEO
#0000 .Screen/x DEO2
#0010 .Screen/y DEO2
;line-icn .Screen/addr DEO2
#01 .Screen/sprite DEO
#0070 .Screen/x DEO2
#0010 .Screen/y DEO2
#01 .Screen/sprite DEO
JMP2r
(
@|assets )
@bar-icn
&a [
0000 007e 007e 007e 007e 007e 007e 0000 ]
&b [
0000 00ff 00ff 00ff 00ff 00ff 00ff 0000 ]
&c [
0000 00fe 00fe 00fe 00fe 00fe 00fe 0000 ]
@close-icn
&default [
0000 00ff 8080 8080 8080 8080 80ff 0000
0000 00ef 202f 202f 202f 202f 20ef 0000 ]
&active [
0000 00ff 84a4 9580 f180 95a4 84ff 0000
0000 00ef 20af 202f e02f 20af 20ef 0000 ]
@title-icn [
0000 0080 0080 0080 0000 0000 82c2 e2f2
0000 0000 0000 3c66 0000 0000 3030 7831
0000 0000 0000 f098 0000 0000 1f19 1919
0000 0000 0080 8f91 0000 0000 0101 0f99
0000 0000 8080 8080 0080 0080 0080 0000
ba9e 8e86 8200 0000 6666 6666 3c00 0000
3131 3131 1800 0000 98f8 8088 f000 0000
1f18 1818 1800 0000 0f19 1919 0f00 0000
9999 9999 8f00 0000 8080 8080 8000 0000 ]
@page-icn [
00ff 4020 1008 0402 00ff 0000 0000 0000
00ff 0101 0101 0101 0100 0000 0000 0000
0080 4020 1008 0402 0101 0101 0101 0101
0000 0000 0000 0000 0100 0000 0000 0000
0181 4121 1109 0503 0000 ff00 ff00 ffff
0000 ff00 ff00 ffff 0100 ff00 ff00 ffff ]
&bottom [
ff00 ff00 ff00 ffff ]
@line-icn [
00ff 0000 0000 0000 ]

Binary file not shown.