Virtual Buttons and DPad

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
Thanks for the apk! Hopefully I will have some time this weekend.

The new features can definitely be implemented. I will focus on solving the bug first.

- Change the opacity of the buttons image inside the game;
Do you mean with a plugin command? Or in response to some action?
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
910
Reaction score
362
First Language
Portuguese - Br
Primarily Uses
RMMV
Thanks for the apk! Hopefully I will have some time this weekend.

The new features can definitely be implemented. I will focus on solving the bug first.



Do you mean with a plugin command? Or in response to some action?
Thank you @Aloe Guvner !! ^^

In the opacity case, i mean with a plugin command, or with a script call. I was looking into the code and i see something about opacity of the sprite button. I will test some commands to see if i can already do this and will return the results to you here.
 

TenTranVN

Veteran
Veteran
Joined
Apr 13, 2017
Messages
158
Reaction score
17
First Language
Vietnam
Primarily Uses
RMMV
Hi @Aloe Guvner
Thinking about the issue, i uploaded an APK for you to see the problem.
As soon as the game start, you only have to enter in the door above and out, and repeat the process.
You will see that the player will keep going up. When you press other directions, they will return Up again. It only stops when you press UP again.
Same thing when you exit the room, but instead going Up, it will going down.
https://www.dropbox.com/s/po6ma59tui9r7nf/Aloe Issue.apk?dl=0

Also, i have been thinking if you can implement two things:
- Change the opacity of the buttons image inside the game;
- Add an animation to the button when it is pressed (it can be a dark or light flash).
Like this video for example:
good idea
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
259
Reaction score
302
First Language
English
Primarily Uses
N/A
@Aloe Guvner Great plugin! I was using Yanfly's Picture Common events before as a mobile UI, but your setup works much better.

There's a couple things I wanted to ask:

1. Not sure if this is a bug or intended behavior: the "mobileui hide" plugin commands work just fine, but after any dialogue appears, the buttons re-enable themselves by default.

2. I was wondering if there's a simple way to add a delay between when a message box disappears and when the mobileUI re-appears. I ask this because my game uses a Bust plugin, and to have it work optimally, I have to add a 15 frame wait timer between each message box that uses a bust. It's not a big deal, but having that 15 frame wait means that the mobileUI awkwardly re-appears between each message box.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
@jkweath good ideas

I didn't have access to my computer with RPG Maker for several weeks but I do again. My first priority will be fixing the annoying bug with the Dpad reported by other users.

For your suggestions:
1. I can create a option in the configuration, you can choose whether the plugin "remembers" if you've used the plugin command or not. If you've used it, the buttons won't re-appear until you use the "show" plugin command.

2. There's a setting that controls the duration of the fade-in & fade-out, does that work for you? I understand a delay setting is different than a duration setting. It's probably valuable to have both.

By the way, the next update will be big and I'm going to rename this plugin to "Virtual Buttons and Dpad", since it can be used on desktop too. I'm going to include something that automatically copies your settings so you don't have to change anything.
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
259
Reaction score
302
First Language
English
Primarily Uses
N/A
@Aloe Guvner Adding an option to remember the plugin command would work for sure.

As for the delay problem, I experimented with the fade duration and didn't have any luck. I tried going into the code itself and modifying the fade-in duration specifically to be longer. It technically works, but then the buttons take too long to re-appear and be usable again.

I hope adding a delay option would be useful for more people than just me. Besides that, keep up the great work!
 

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
910
Reaction score
362
First Language
Portuguese - Br
Primarily Uses
RMMV
@Aloe Guvner Great plugin! I was using Yanfly's Picture Common events before as a mobile UI, but your setup works much better.

There's a couple things I wanted to ask:

1. Not sure if this is a bug or intended behavior: the "mobileui hide" plugin commands work just fine, but after any dialogue appears, the buttons re-enable themselves by default.

2. I was wondering if there's a simple way to add a delay between when a message box disappears and when the mobileUI re-appears. I ask this because my game uses a Bust plugin, and to have it work optimally, I have to add a 15 frame wait timer between each message box that uses a bust. It's not a big deal, but having that 15 frame wait means that the mobileUI awkwardly re-appears between each message box.
I think you can handle this editing the parte on the code between lines:

1092 and 1106. At least the first question i think its possible. There you can find the part of the code that deals with the show mobile ui during the message box.
For the 15 frames thing i dont know for sure.

@jkweath hey! I found a solution for you for a while.
Replace all the codes between and include the lines 1092 and 1106 with this code:

Code:
    Alias.Window_Message_update = Window_Message.prototype.update;
    Window_Message.prototype.update = function() {
        if ($gameSwitches.value(X) == true) {
            SceneManager._scene.hideMobileUI();
        } else if ($gameMessage.isBusy() && $gameSwitches.value(X) == false) {
            SceneManager._scene.hideMobileUI();
        } else if (!$gameMessage.isBusy() && $gameSwitches.value(X) == false) {
            SceneManager._scene.showMobileUI();
        }
        Alias.Window_Message_update.call(this);
    };
Change all the "X" value in the code for the number of switch you desire.

This code will make the, when switch X is ON, game will hide the controls. Then you can make the cutscenes etc. to make the controls appear again, just turn the switch off.

But, also, if this switch is OFF and the message window is active the controls will hide. When the message window is closed(and the switch still OFF), the controls will be showed again in the speed that you define in the parameters.
 
Last edited:

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
259
Reaction score
302
First Language
English
Primarily Uses
N/A
@Eliaquim thanks a bunch! I'll try this out when I get the chance.

@Aloe Guvner I've been playtesting my game on mobile with your plugin and wanted to give some more feedback:

1. There was a time when I transferred between maps that the "up" direction seemingly got stuck and I couldn't input any other direction for a few seconds. I think this was mentioned elsewhere in the thread, but I just wanted to mention it so you know more than one person is having the issue. Not sure if it can happen with other directions or not.

EDIT: @Aloe Guvner Wanted to add a couple more things about this bug. For one, it can trigger any time the player is transferred, including if it's on the same map. It doesn't always seem to be the direction the player is holding as he is transferred.

The big thing to report (if it hasn't been already) is that the bug is easily fixed by tapping the direction the player is stuck moving in. I imagine the way to solve this bug would be to somehow "clear out" all movement commands upon a player transfer.

2. I'm using Yanfly's Battle Status Window, and despite having touch controls disabled for battle scenes, they seem to turn back on when I'm using an ability that selects other actors. I'm not sure if this is a compatibility thing or not, I need to test it more.

3. I've seen some people mention adding a script/plugin call to adjust button opacity on the fly. I second that idea.

That's all for now!
 
Last edited:

aroha

Villager
Member
Joined
Apr 29, 2019
Messages
28
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
864351351.JPG 21541531534.JPG
can not be used
What's the problem?
RMMV Version 1.6.2
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
@aroha You have a space at the end of the filename. Make sure not to rename the file.
 

aroha

Villager
Member
Joined
Apr 29, 2019
Messages
28
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
@Aloe Guvner Thank you.It can be work when I remove the space.
But I can't do anything when I open the menu in the game.And the button picture is gone.
What's the problem?
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
But I can't do anything when I open the menu in the game.
In your settings, do you have "Disable Touch Selectable Windows" include Scene_Menu? This would mean that touch selectable windows are disabled in the menu scene.

upload_2019-4-30_23-15-47.png

And the button picture is gone.
What settings did you make for the button?
 

aroha

Villager
Member
Joined
Apr 29, 2019
Messages
28
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
@Aloe Guvner
It can be work when I include Scene_Menu to the button text list.
But another problem has arisen. When I talked to the event, all the buttons disappeared.
And I tested and found that it was a conflict with other plugins.
My English is so bad,I hope you can read to understand this.
Thank you.
 

aroha

Villager
Member
Joined
Apr 29, 2019
Messages
28
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
@Aloe Guvner
I found another problem. When I talk to the event, it doesn't display the button image, only the touch operation. What's even worse: if you use the down button to make a selective dialogue in the story, it will Keep pressing the down button, which means I can't choose another option.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
When I talked to the event, all the buttons disappeared.
That is intentional. If people want, I can create a setting to toggle that.

What's even worse: if you use the down button to make a selective dialogue in the story, it will Keep pressing the down button, which means I can't choose another option.
Is the "down button" on the keyboard? Or a virtual button?
Can you make a screenshot, video, or gif of that issue?
 

jkweath

Goes Fast
Veteran
Joined
Sep 21, 2016
Messages
259
Reaction score
302
First Language
English
Primarily Uses
N/A
@Aloe Guvner just curious, is version 2.0 actually out yet? It says on the original post that you released it on April 25th but the download is still only for version 1.4.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
@jkweath You're right, that's a mistake. I fixed the Dpad bug and added a couple features which are available on a separate branch in Github. I still have a few more features to add, but probably won't have time until the weekend. So I'm targeting this Saturday
 

aroha

Villager
Member
Joined
Apr 29, 2019
Messages
28
Reaction score
7
First Language
Chinese
Primarily Uses
RMMV
That is intentional. If people want, I can create a setting to toggle that.
I want it ,please create a setting to toggle that.

Is the "down button" on the keyboard? Or a virtual button?
Can you make a screenshot, video, or gif of that issue?
486412135.gif
It is that problem."down button" is a virtual button
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,061
First Language
English
Primarily Uses
RMMV
That's definitely a bug. Can you PM me that MapXXX.json file? You can find that file in the "data" folder of your project.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Setup a system to cull enemies that are too far from the player to matter, and to spawn new ones just outside of view. Take that lag! :LZSexcite:
That trope is alive more than ever, not so much elemental Crystal's but gathering magical objects or doing "task" to unlock this oddly specific thing is everywhere, I saw it saw it in the IT 2 remake, avengers and every season of supernatural
It's raining...in winter :")
I was stunned-STUNNED-to find that I have been working on my current project since November. It feels like so much less time than that.
Stream will be live shortly with some art! Going to do a recolor, then start on a new monster! Feel free to drop by!

Forum statistics

Threads
93,712
Messages
914,854
Members
123,315
Latest member
Ceoxy-
Top