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
eb98464b
Commit
eb98464b
authored
May 06, 2020
by
echicken
Browse files
Support use of a "mouse" pointing device for the clicking
and the scrolling of the things.
parent
8b6fd9e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
exec/ftn-setup.js
exec/ftn-setup.js
+27
-16
No files found.
exec/ftn-setup.js
View file @
eb98464b
...
...
@@ -4,11 +4,20 @@ load('sbbsdefs.js');
load
(
'
frame.js
'
);
load
(
'
tree.js
'
);
const
fidoaddr
=
load
({},
'
fidoaddr.js
'
);
require
(
"
mouse_getkey.js
"
,
"
mouse_getkey
"
);
const
ansiterm
=
load
({},
'
ansiterm_lib.js
'
);
function
mouse_enable
(
enable
)
{
if
(
!
console
.
term_supports
(
USER_ANSI
))
return
;
ansiterm
.
send
(
'
mouse
'
,
enable
?
'
set
'
:
'
clear
'
,
'
normal_tracking
'
);
}
js
.
on_exit
(
'
console.attributes =
'
+
console
.
attributes
);
js
.
on_exit
(
'
bbs.sys_status =
'
+
bbs
.
sys_status
);
js
.
on_exit
(
'
mouse_enable(false);
'
);
bbs
.
sys_status
|=
SS_MOFF
;
mouse_enable
(
true
);
const
addrs
=
{};
system
.
fido_addr_list
.
forEach
(
function
(
e
)
{
...
...
@@ -60,34 +69,36 @@ frame.open();
tree
.
open
();
frame
.
cycle
();
var
t
;
var
key
;
var
zone
;
console
.
ungetstr
(
KEY_UP
);
while
(
!
js
.
terminated
)
{
key
=
console
.
getkey
();
if
(
key
.
toLowerCase
()
==
'
q
'
)
break
;
tree
.
getcmd
(
key
);
if
(
key
==
KEY_UP
||
key
==
KEY_DOWN
||
key
==
KEY_HOME
||
key
==
KEY_END
)
{
key
=
mouse_getkey
(
K_NONE
,
undefined
,
true
);
//key = console.getkey();
if
(
key
.
key
.
toLowerCase
()
==
'
q
'
)
break
;
t
=
tree
.
getcmd
(
key
);
if
((
key
.
mouse
&&
t
)
||
key
.
key
==
KEY_UP
||
key
.
key
==
KEY_DOWN
||
key
.
key
==
KEY_HOME
||
key
.
key
==
KEY_END
)
{
zone
=
tree
.
currentItem
.
__ftn_setup
;
info_frame
.
erase
(
'
'
);
info_frame
.
putmsg
(
'
\
1h
\
1w
'
+
zone
.
name
+
'
\r\n
'
);
if
(
zone
.
desc
)
{
info_frame
.
putmsg
(
'
\
1n
\
1w
'
+
zone
.
desc
+
'
\r\n\r\n
'
);
}
info_frame
.
putmsg
(
'
\
1n
\
1w
'
+
zone
.
desc
+
'
\r\n\r\n
'
);
}
if
(
zone
.
info
)
{
info_frame
.
putmsg
(
'
\
1h
\
1cInformation
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
info
+
'
\r\n\r\n
'
);
}
info_frame
.
putmsg
(
'
\
1h
\
1cInformation
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
info
+
'
\r\n\r\n
'
);
}
if
(
zone
.
coord
)
{
info_frame
.
putmsg
(
'
\
1h
\
1cCoordinator
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
coord
+
'
\r\n\r\n
'
);
}
info_frame
.
putmsg
(
'
\
1h
\
1cCoordinator
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
coord
+
'
\r\n\r\n
'
);
}
if
(
zone
.
email
)
{
info_frame
.
putmsg
(
'
\
1h
\
1cEmail
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
email
+
'
\r\n\r\n
'
);
}
info_frame
.
putmsg
(
'
\
1h
\
1cEmail
\
1w:
\r\n
'
);
info_frame
.
putmsg
(
'
\
1n
'
+
zone
.
email
+
'
\r\n\r\n
'
);
}
if
(
addrs
[
zone
.
_zone_number
])
{
info_frame
.
putmsg
(
'
\
1h
\
1rExisting address found:
'
+
addrs
[
zone
.
_zone_number
]
+
'
\r\n
'
);
info_frame
.
putmsg
(
'
\
1h
\
1rExisting address found:
'
+
addrs
[
zone
.
_zone_number
]
+
'
\r\n
'
);
}
}
if
(
frame
.
cycle
())
console
.
gotoxy
(
console
.
screen_columns
,
console
.
screen_rows
);
...
...
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