Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
837edb4a
Commit
837edb4a
authored
Sep 25, 2019
by
deuce
Browse files
Support all the @key arguments, and centre the morestr.
parent
f30ec435
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
xtrn/lord2/lord2.js
xtrn/lord2/lord2.js
+25
-4
No files found.
xtrn/lord2/lord2.js
View file @
837edb4a
...
...
@@ -1033,7 +1033,6 @@ function more()
var
oa
=
dk
.
console
.
attr
.
value
;
curlinenum
=
1
;
// TODO: Are those spaces supposed to be in morestr?
lw
(
'
`r0`2
'
+
morestr
);
getkey
();
dk
.
console
.
print
(
'
\r
'
);
...
...
@@ -1980,6 +1979,10 @@ function run_ref(sec, fname)
if
(
args
.
length
<
1
)
throw
(
'
No filename for displayfile at
'
+
fname
+
'
:
'
+
line
);
var
f
=
new
File
(
getfname
(
getvar
(
args
[
0
]).
toLowerCase
()));
if
(
!
file_exists
(
f
.
name
))
{
lln
(
'
`0File
'
+
getvar
(
args
[
0
])
+
'
missing - please inform sysop
'
);
return
;
}
if
(
!
f
.
open
(
'
r
'
))
throw
(
'
Unable to open
'
+
f
.
name
+
'
at
'
+
fname
+
'
:
'
+
line
);
lines
=
f
.
readAll
();
...
...
@@ -2093,10 +2096,28 @@ function run_ref(sec, fname)
exit
(
0
);
},
'
key
'
:
function
(
args
)
{
if
(
args
.
length
>
0
&&
args
[
0
].
toLowerCase
()
===
'
nodisplay
'
)
getkey
();
if
(
args
.
length
>
0
)
{
switch
(
args
[
0
].
toLowerCase
())
{
case
'
nodisplay
'
:
getkey
();
return
;
case
'
top
'
:
dk
.
console
.
gotoxy
(
0
,
0
);
break
;
case
'
bottom
'
:
dk
.
console
.
gotoxy
(
0
,
23
);
break
;
default
:
throw
(
'
Unhandled key arg "
'
+
args
[
0
]
+
'
" at
'
+
fname
+
'
:
'
+
line
);
}
}
else
more
();
lw
(
'
\r
'
);
dk
.
console
.
cleareol
();
lw
(
spaces
(
40
-
(
displen
(
morestr
)
/
2
))
+
morestr
);
getkey
();
lw
(
'
\r
'
);
dk
.
console
.
cleareol
();
},
'
addchar
'
:
function
(
args
)
{
var
tmp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment