Eli Mobile Controls - Responsive on screen buttons for mobile games!

Hi there!

Thanks for your work,
I'm having a situation too I can add the joystick or d-pad and control button with no problem,
but when I try to add a regular button I can't and have this error

1675062535369.png


Can you help me please ?

Thanks again for this!
Hi there!

Thanks for your work,
I'm having a situation too I can add the joystick or d-pad and control button with no problem,
but when I try to add a regular button I can't and have this error

View attachment 251903

Can you help me please ?

Thanks again for this!
Hi there!

I believe the problem is something related to the plugin parameters. more precisely, the regular button parameters. Open these parameters and make sure you have them like below:
1675083269923.png
Thanks for the answer!

It fixed my problem for standard keys like action dash and menu (z and shift)
but doesnt with other input like a, s or d (used by chrono engine for items, skill or shield)
No error log this time with f12

Any idea on how to solve this ?

also is it possible to use two keys together ? if i move using the Dpad and a button to attack It will stop my move and i have to press the Dpad again
so this make the dash fonction unusable for exemple (it's the B button in my demo)
Thanks for the answer!

It fixed my problem for standard keys like action dash and menu (z and shift)
but doesnt with other input like a, s or d (used by chrono engine for items, skill or shield)
No error log this time with f12

here a link if you want to check in game http://lordstryagain.fr/

Any idea on how to solve this ?

also is it possible to use two keys together ? if i move using the Dpad and a button to attack It will stop my move and i have to press the Dpad again
so this make the dash fonction unusable for exemple (it's the B button in my demo)
Hi there!

EDIT - I believe I fixed the problem on the new version 5.0.12

Spoiler: Chrono Engine
About the Chrono Engine, your buttons are overlapping each other. They will MAY not work like this. They cannot be above/below another button. The best way to debug this is to make a test button that is a square. So you can see if they will overlap with each other on screen.
Try to fix this and see if they will work with Chrono Engine:
a.JPG

Spoiler: Multi Touch
You can hit two buttons together. If you put a hot and cold image, you may see that they can be pressed together. But, it does not support multitouch due to how RPG Maker handles the input system.

Someone also sent to me a request to work with some mog plugins. It seems the Mog ones do not work with my mobile buttons. I will look into this but don't have that time now.

Version 5.0.12 - 01/31/2022​

  • Fixed a compatibility issue with Mog Chrono Engine and LMBS.
  • Fixed an error on the Regular Button parameters, that was needed to set the script In/Out with an empty string, or an error will be triggered.
  • Some minor performance improvements when using Script In and Out from regular buttons.
Just saw and try the update and it works ! (so quick)
Thanks a lot for the help
First, this is a fantastic plugin! I've been testing with IOS and I've run into an issue where you are determining if we are in landscape or portrait mode. You used the function evaluating screen.orientation.type. I think we need a different function there in order to support ios. it errors out with an undefined. Anyone else run into this when testing on an apple device?
First, this is a fantastic plugin! I've been testing with IOS and I've run into an issue where you are determining if we are in landscape or portrait mode. You used the function evaluating screen.orientation.type. I think we need a different function there in order to support ios. it errors out with an undefined. Anyone else run into this when testing on an apple device?
Hi there!
I do not have an apple device to test. So, try replacing what is inside of the "isLandscape" function, with this:

JavaScript:
if(Utils.isMobileSafari()){
    return window.innerHeight < window.innerWidth

}else{
    if(typeof screen.orientation === "undefined"){
        return window.innerHeight < window.innerWidth //detect landscape old style
    }else{
        return screen.orientation.type.includes("landscape")   
    }
}

It should look like this:
1675321043153.png


If it works, I will add it to the plugin. Let me know!
Hi there!
I do not have an apple device to test. So, try replacing what is inside of the "isLandscape" function, with this:

JavaScript:
if(Utils.isMobileSafari()){
    return window.innerHeight < window.innerWidth

}else{
    if(typeof screen.orientation === "undefined"){
        return window.innerHeight < window.innerWidth //detect landscape old style
    }else{
        return screen.orientation.type.includes("landscape")  
    }
}

It should look like this:
View attachment 252278

If it works, I will add it to the plugin. Let me know!
Thank you so much, I will test this tonight! I appreciate the quick reply!
It didn't actually work, but I will be troubleshooting further with your code. I will keep you updated.
It didn't actually work, but I will be troubleshooting further with your code. I will keep you updated.
I will see if I can find another way!
Hi there!

Is it possible to set the control button to hide controls by default and show them only if I click on it ?
By default the buttons always appears at start but I'm searching a way to have them hidden at start and be able to activate them If they want (game mainly played on browser pc and sometimes on mobile)

thanks again
Hi there!

Is it possible to set the control button to hide controls by default and show them only if I click on it ?
By default the buttons always appears at start but I'm searching a way to have them hidden at start and be able to activate them If they want (game mainly played on browser pc and sometimes on mobile)

thanks again
Hi there!

Try these ones and see if they will help. If I remember correctly, they will hide the control button.
JavaScript:
//To hide:

Eli.MobileControls.controlButton.parameters.enable = false
Eli.MobileControls.controlButton.removeFromScene()

//To show:

Eli.MobileControls.controlButton.parameters.enable = true
Eli.MobileControls.controlButton.addOnScene()

And to hide all buttons, I believe:
JavaScript:
Eli.MobileControls.hideButtons() // hide
Eli.MobileControls.showButtons() // show
Hi there!

Try these ones and see if they will help. If I remember correctly, they will hide the control button.
JavaScript:
//To hide:

Eli.MobileControls.controlButton.parameters.enable = false
Eli.MobileControls.controlButton.removeFromScene()

//To show:

Eli.MobileControls.controlButton.parameters.enable = true
Eli.MobileControls.controlButton.addOnScene()

And to hide all buttons, I believe:
JavaScript:
Eli.MobileControls.hideButtons() // hide
Eli.MobileControls.showButtons() // show
Thanks for this,

I've just tried this the problem is when buttons are hidden I can't reopen them, I can with keyboard input but not on mobile because if I use "Eli.MobileControls.hideButtons() // hide"
the control button can't show them up again

1676045558434.png


I'm searching just an option to have all buttons except the control button hidden at start and if I click on the control button I can show or hide them again
Thanks for this,

I've just tried this the problem is when buttons are hidden I can't reopen them, I can with keyboard input but not on mobile because if I use "Eli.MobileControls.hideButtons() // hide"
the control button can't show them up again

View attachment 252922

I'm searching just an option to have all buttons except the control button hidden at start and if I click on the control button I can show or hide them again
Got it!
I believe you could try this one:
Eli.MobileControls.controlButton.setInput()

It will simulate the control button being pressed. So if the buttons are visible, when you use that script call it will hide them.
If the buttons are hidden, if you use that same script call, it will show them.
This works perfectly thanks !
Hello, I've tried this plugin for MV and this is an amazing plugin!
However, I have a problem... when I'm making a prologue cutscene for my game, the buttons and joystick keep appearing after each dialogue pauses (as in, 1 message box shows up, joystick and button disappeared, but when I put the wait command in between dialogues, the joystick and buttons will appear in the wait period and then disappear again).

Is there any way to disable/enable the joystick and button visibility with eventing/plugin commands so it can disappear throughout the entire cutscene and appear when the player can move?

P.S. the cutscene is in Scene_Map and the Joystick and buttons are set to be visible on Scene_Map and hide on message is set to true
Hello, I've tried this plugin for MV and this is an amazing plugin!
However, I have a problem... when I'm making a prologue cutscene for my game, the buttons and joystick keep appearing after each dialogue pauses (as in, 1 message box shows up, joystick and button disappeared, but when I put the wait command in between dialogues, the joystick and buttons will appear in the wait period and then disappear again).

Is there any way to disable/enable the joystick and button visibility with eventing/plugin commands so it can disappear throughout the entire cutscene and appear when the player can move?

P.S. the cutscene is in Scene_Map and the Joystick and buttons are set to be visible on Scene_Map and hide on message is set to true
Hi there!
Glad you liked 🙂

See if any of those answers can help you out. I will qoute them here, but they are basically 2 or 3 posts above yours. Try to use one or another:

1
Hi there!

Try these ones and see if they will help. If I remember correctly, they will hide the control button.
JavaScript:
//To hide:

Eli.MobileControls.controlButton.parameters.enable = false
Eli.MobileControls.controlButton.removeFromScene()

//To show:

Eli.MobileControls.controlButton.parameters.enable = true
Eli.MobileControls.controlButton.addOnScene()

And to hide all buttons, I believe:
JavaScript:
Eli.MobileControls.hideButtons() // hide
Eli.MobileControls.showButtons() // show

2
Got it!
I believe you could try this one:
Eli.MobileControls.controlButton.setInput()

It will simulate the control button being pressed. So if the buttons are visible, when you use that script call it will hide them.
If the buttons are hidden, if you use that same script call, it will show them.
Hi there!
Glad you liked 🙂

See if any of those answers can help you out. I will qoute them here, but they are basically 2 or 3 posts above yours. Try to use one or another:

1


2
Thank you so much for replying! I realized the second I posted my question, my bad :"D it works now!

Once again thank you for making this awesome plugin!
mano queria saber se pode deixar as imagens de exemplo, pois estou atrapalhando isso só para fazer o plugging funcionar corretamente, vlw

Original thread: https://forums.rpgmakerweb.com/threads/eli-mobile-controls-responsive-on-screen-buttons-for-mobile-games.133940/