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
fb701264
Commit
fb701264
authored
Apr 21, 2020
by
echicken
Browse files
I forgot that Frame has its own word wrapping; use that instead.
parent
b30202a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
exec/xtrn-setup.js
exec/xtrn-setup.js
+2
-1
No files found.
exec/xtrn-setup.js
View file @
fb701264
...
...
@@ -13,6 +13,7 @@ const frame = new Frame(1, 1, console.screen_columns, console.screen_rows, BG_BL
const
main_frame
=
new
Frame
(
1
,
2
,
frame
.
width
,
frame
.
height
-
2
,
BG_BLACK
|
LIGHTGRAY
,
frame
);
const
tree_frame
=
new
Frame
(
1
,
main_frame
.
y
+
1
,
Math
.
floor
(
main_frame
.
width
/
2
),
main_frame
.
height
-
2
,
BG_BLACK
|
LIGHTGRAY
,
main_frame
);
const
info_frame
=
new
Frame
(
tree_frame
.
width
+
1
,
main_frame
.
y
+
1
,
main_frame
.
width
-
tree_frame
.
width
-
1
,
main_frame
.
height
-
2
,
BG_BLACK
|
WHITE
,
main_frame
);
info_frame
.
word_wrap
=
true
;
const
tree
=
new
Tree
(
tree_frame
);
frame
.
putmsg
(
'
External Program Setup
'
);
...
...
@@ -64,7 +65,7 @@ while (!js.terminated) {
xtrn
=
tree
.
currentItem
.
__xtrn_setup
;
info_frame
.
clear
();
info_frame
.
putmsg
(
'
\
x01h
\
x01w
'
+
xtrn
.
Name
+
'
\r\n
'
);
if
(
xtrn
.
Desc
)
info_frame
.
putmsg
(
'
\
x01n
\
x01w
'
+
word_wrap
(
xtrn
.
Desc
,
info_frame
.
width
)
+
'
\r\n
'
);
if
(
xtrn
.
Desc
)
info_frame
.
putmsg
(
'
\
x01n
\
x01w
'
+
xtrn
.
Desc
+
'
\r\n
\r\n
'
);
if
(
xtrn
.
By
)
info_frame
.
putmsg
(
'
\
x01h
\
x01cBy
\
x01w:
\r\n\
x01w
'
+
xtrn
.
By
+
'
\r\n\r\n
'
);
if
(
xtrn
.
Cats
)
info_frame
.
putmsg
(
'
\
x01h
\
x01cCategories
\
x01w:
\r\n\
x01n
'
+
xtrn
.
Cats
+
'
\r\n\r\n
'
);
if
(
xtrn
.
Subs
)
info_frame
.
putmsg
(
'
\
x01h
\
x01cSubcategories
\
x01w:
\r\n\
x01n
'
+
xtrn
.
Subs
+
'
\r\n\r\n
'
);
...
...
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