Virtual Buttons and DPad

Discussion in 'JS Plugin Releases (RMMV)' started by Aloe Guvner, Apr 18, 2018.

  1. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    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.

    Do you mean with a plugin command? Or in response to some action?
     
    #81
    Eliaquim likes this.
  2. Eliaquim

    Eliaquim Veteran Veteran

    Messages:
    484
    Likes Received:
    122
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    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.
     
    #82
  3. TenTranVN

    TenTranVN Veteran Veteran

    Messages:
    104
    Likes Received:
    14
    First Language:
    Vietnam
    Primarily Uses:
    RMMV
    good idea
     
    #83
    Eliaquim likes this.
  4. pedrohp3

    pedrohp3 Warper Member

    Messages:
    2
    Likes Received:
    2
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Thanks @Aloe Guvner and @Eliaquim! That's exactly the issue I'm facing! I really look forward to seeing an update :)
     
    #84
    Eliaquim likes this.
  5. jkweath

    jkweath Goes Fast Veteran

    Messages:
    164
    Likes Received:
    125
    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.
     
    #85
  6. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    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.
     
    #86
  7. jkweath

    jkweath Goes Fast Veteran

    Messages:
    164
    Likes Received:
    125
    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!
     
    #87
  8. Eliaquim

    Eliaquim Veteran Veteran

    Messages:
    484
    Likes Received:
    122
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    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: Apr 21, 2019
    #88
  9. jkweath

    jkweath Goes Fast Veteran

    Messages:
    164
    Likes Received:
    125
    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: Apr 29, 2019
    #89
    TenTranVN likes this.
  10. aroha

    aroha Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    Chinese
    Primarily Uses:
    RMMV
    864351351.JPG 21541531534.JPG
    can not be used
    What's the problem?
    RMMV Version 1.6.2
     
    #90
  11. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    @aroha You have a space at the end of the filename. Make sure not to rename the file.
     
    #91
  12. aroha

    aroha Villager Member

    Messages:
    6
    Likes Received:
    1
    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?
     
    #92
  13. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    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

    What settings did you make for the button?
     
    #93
  14. aroha

    aroha Villager Member

    Messages:
    6
    Likes Received:
    1
    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.
     
    #94
  15. aroha

    aroha Villager Member

    Messages:
    6
    Likes Received:
    1
    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.
     
    #95
  16. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    That is intentional. If people want, I can 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?
     
    #96
  17. jkweath

    jkweath Goes Fast Veteran

    Messages:
    164
    Likes Received:
    125
    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.
     
    #97
    Aloe Guvner likes this.
  18. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    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
     
    #98
  19. aroha

    aroha Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    Chinese
    Primarily Uses:
    RMMV
    I want it ,please create a setting to toggle that.

    486412135.gif
    It is that problem."down button" is a virtual button
     
    #99
    Aloe Guvner likes this.
  20. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,399
    Likes Received:
    882
    Location:
    USA
    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.
     

Share This Page