Skip to content

Commit 868bce0

Browse files
authored
fix: Support scrolling in dEDITMULTI (#431)
Also implement missing POKE$ in compiler, various other dialog UI issues. fixes #416
1 parent e5e1184 commit 868bce0

File tree

11 files changed

+438
-239
lines changed

11 files changed

+438
-239
lines changed

examples/Tests/dialog.opo

39 Bytes
Binary file not shown.

examples/Tests/dialog.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,17 @@ PROC cancelDlg:
155155
ENDP
156156

157157
PROC editMultiDlg:
158-
LOCAL result%, buf&(16), ptr&, text$(60), len&
158+
LOCAL result%, buf&(16), ptr&, text$(60), len&, i%
159+
i% = 0
160+
WHILE i% < 20
161+
text$ = text$ + NUM$(i%, 2) + CHR$(7)
162+
i% = i% + 1
163+
ENDWH
164+
159165
ptr& = ADDR(buf&())
160-
buf&(1) = 8
161-
buf&(2) = &64636261
162-
buf&(3) = &67666507
166+
POKE$ ptr& + 3, text$
167+
POKEL ptr&, LEN(text$)
168+
163169
dINIT "Multi edit"
164170
dEDITMULTI ptr&, "Prompt", 20, 5, 60
165171
dTEXT "Another", "Option", KDTextAllowSelection%

examples/Tests/menu.opo

1 Byte
Binary file not shown.

examples/Tests/menu.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ PROC bigmenu%:
3434
mCASC "Create new", "File...", %n, "Folder...", %N
3535
mCASC "Close", "File", %e, "Folder", %z, "All files", %E
3636
mCASC "List", "List open files...", %j, "List recent files...", %J
37-
mCARD "File", "Open", %o, "Create new>", 16, "Close>", -17, "Delete...", %d, "Rename...", %r, "Properties...", -%p, "List>", 18, "Browse folders...", %g
37+
mCARD "File", "Open", %o, "Create new>", 16, "Close>", -17, "Delete...", %d, "Rename...", %r, "Properties...", -%p, "List>", 18, "Browse folders...", %g, "Doom", %d
3838

3939
mCASC "Find files", "Find files...", %f, "Find again...", %F
4040
mCARD "Edit", "Cut (move)", %x, "Copy", %c, "Paste", %v, "Clear clipboard", %X, "Select all", -%a, "Set bookmark", %B, "Go to bookmark", -%b, "Find files>", 19

src/compiler.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ Callables = {
567567
POKEB = Op("PokeB", {SiboInt, Int}),
568568
POKEF = Op("PokeD", {SiboInt, Float}),
569569
POKEL = Op("PokeL", {SiboInt, Long}),
570+
["POKE$"] = Op("PokeStr", {SiboInt, String}),
570571
POKEW = Op("PokeW", {SiboInt, Int}),
571572
POS = Fn("Pos", {}, Int),
572573
POSITION = Op("Position", {Int}),

0 commit comments

Comments
 (0)