caiiiycuk / js-dos

The best API for running dos programs in browser
https://js-dos.com
1k stars 123 forks source link

How can i add "active" style when clicking on a virtual button #292

Closed shaylevary closed 10 months ago

shaylevary commented 10 months ago

Hi,

I would like to add a function, that when clicking on a virtual button while playing on mobile, it will change the button color (active). Currently, the virtual button style is static when clicking on it.

Can i add some script code in order to display the virtual buttons in active mode when click on it on mobile?

caiiiycuk commented 10 months ago

You can do it with css I think

shaylevary commented 10 months ago

I've tried to add this css code:

.emulator-button.active, .emulator-button:hover, { background-color:red; }

But it doesn't seems to work when i click on the virtual button on my mobile.

caiiiycuk commented 10 months ago

Did you tried to use !important? Anyway there is no other options for now.