GithubHelp home page GithubHelp logo

Comments (16)

ethanaobrien avatar ethanaobrien commented on May 14, 2024

I don't quite get what you're asking, can you explain

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

im trying to use play() and pause() functions on my own buttons and in different situations.
but i dont know whats the according name of these functions

from emulatorjs.

ethanaobrien avatar ethanaobrien commented on May 14, 2024

So you would like the ability to call the play/pause function?

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

yes exactly

from emulatorjs.

ethanaobrien avatar ethanaobrien commented on May 14, 2024

okie, Give me some time and I'll get that to you

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

Any progress on this? Thanks Ethan

from emulatorjs.

ethanaobrien avatar ethanaobrien commented on May 14, 2024

Sorry, havent had too much time to look at this. I haven't been able to locate the location of the pause/play functions. sorry. I'll let you know when I find it

from emulatorjs.

allancoding avatar allancoding commented on May 14, 2024

You can use jquery and run $("[data-btn='play']").trigger("click");
That will toggle play and pause.

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

You can use jquery and run $("[data-btn='play']").trigger("click"); That will toggle play and pause.

Thats nice!
Anyway to call netplay join function with parameters from javascript?

from emulatorjs.

allancoding avatar allancoding commented on May 14, 2024

You first have to set the players name.
You can do that with $("[data-btn='netplay']").trigger("click");$(".ejs--158ea9dd34e3e7af2d837f8b05babb").attr("hidden","");$(".ejs--71527b6509aa48afce3ce1a11c02f0").val("players name");setTimeout(function(){$(".ejs--71527b6509aa48afce3ce1a11c02f0").trigger("click");}, 1000);
There has to be a current room for it to work So would you create a room and then join or what?

from emulatorjs.

allancoding avatar allancoding commented on May 14, 2024

Do you what to do if room not found or too many players create new one?

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

im live fetching rooms as you pointed so i can disable the ones maxed out.

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

$(".ejs--158ea9dd34e3e7af2d837f8b05babb").attr("hidden","");

this working but despite filling input with provided players name joins/creates game and players name remains undefined.

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

click submit playersname was missing
adding this $('.ejs--319bcec5dee9444e1a2a53d6503b7c').first().trigger("click");
solves the issue.

from emulatorjs.

ethanaobrien avatar ethanaobrien commented on May 14, 2024

On the latest version (I just pushed) you can call these functions

play: window.EJS_MODULE.resumeMainLoop();
pause: window.EJS_MODULE.pauseMainLoop();

The play/pause button in the UI will not change

@imneckro Can I close?

from emulatorjs.

imneckro avatar imneckro commented on May 14, 2024

@ethanaobrien Great Ethan thanks a lot. Yes go ahead!

from emulatorjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.