fix(ags player): show players when only one present

This commit is contained in:
matt1432 2023-11-28 08:39:36 -05:00
parent 8bd1c23ce0
commit 5b72e6fa0a

View file

@ -46,6 +46,15 @@ export default ({
...connections, ...connections,
[gesture, (overlay, realGesture) => { [gesture, (overlay, realGesture) => {
if (realGesture) {
overlay.list().forEach((over) => {
over.visible = true;
});
}
else {
overlay._showTopOnly(overlay);
}
// Don't allow gesture when only one player // Don't allow gesture when only one player
if (overlay.list().length <= 1) { if (overlay.list().length <= 1) {
return; return;
@ -56,15 +65,6 @@ export default ({
const playerBox = overlay.list().at(-1); const playerBox = overlay.list().at(-1);
if (realGesture) {
overlay.list().forEach((over) => {
over.visible = true;
});
}
else {
overlay._showTopOnly(overlay);
}
// Slide right // Slide right
if (offset >= 0) { if (offset >= 0) {
playerBox.setCss(` playerBox.setCss(`