fancyapps / ui

A library of JavaScript UI components, includes the best lightbox - Fancybox5
https://fancyapps.com/
Other
820 stars 99 forks source link

Emulator.js Popup window #647

Closed unknown1818 closed 7 months ago

unknown1818 commented 7 months ago

Is your feature request related to a problem? Please describe.

Hi,

Im building file manager in bash+cgi i would like to have roms when i click it show popup windows and display emulatorjs in it. I got it working but keyboard and mouse is not working im using it via Inline content custom htm code with emulatorjs in it. Its like the content emulatorjs is not getting input, its like java inside java

Describe the solution you'd like

I would like to have popup windows with emulatorjs custom html code

Describe alternatives you've considered

No response

Additional context

No response

unknown1818 commented 7 months ago

Ok i figure it out if someone need it :P

# ----------------------- GRY - inframe
echo '<div id="game_list">'
#  NES
while IFS='|' read -r local_path file_name file_name_encoded extension; do
echo "  <icon>"
echo "      <a href=".tmp/$file_name_encoded.html" data-fancybox="game_list" data-type="iframe">"
echo "          <img src="media/images/$file_name_encoded.png" />"
echo "          <name>$file_name</name>"
echo "      </a>"
echo "  </icon>"

# Generowanie emulatora iframe

if [ $extension = nes ]
    then
        emulator=nes
    else
        echo ""
fi

cat << EOF | sudo tee "$LOCAL_PATH$REQUEST_URI_DECODED.tmp/$file_name.html" >/dev/null
<html>
<head>
  <div id="game" style="display:none;height:80%;width:80%;"></div>
</head>
<script type='text/javascript'>
  EJS_player = '#game';
  EJS_core = '$emulator';
  EJS_gameUrl = '$url$REQUEST_URI_DECODED$file_name_encoded.$extension';
  EJS_fullscreenOnLoaded = true
</script>
<script src="/js/emulatorjs_4.0.12/data/loader.js"></script>
</html>
EOF

done < temp/game_nes_list
# -------------------------------------------------------
echo '</div>'

Best filemanager website with integrated one click roms list with one click you have fullscreen game :P

fancyapps commented 7 months ago

Hi, It seems that you should just disable touch events, see this demo - https://jsfiddle.net/hj3dts5e/