Virtual Buttons and DPad

● ARCHIVED · READ-ONLY
Started by Aloe Guvner 229 posts Page 6 of 12 View original ↗
  1. Aloe Guvner said:
    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.
    Then I found another problem. When I use the transfer, sometimes it will automatically go straight ahead.
    2019-05-02 22-30-17_20190502224003.gif
  2. @aroha Yup, I'm aware of that bug. It was reported here and here and here and here.

    I've made the fix for that bug as mentioned here, it's available on a separate branch in Github that you can download if you want. I haven't "released" it yet because I'm still adding a few more features and testing. Testing takes a lot of time. If you'll allow me some time, I'm planning to release it this weekend :cool:
  3. All - Big update here - I'm pretty sure I've fixed every bug and added every requested feature. I did a lot of testing, so hopefully the new features didn't break anything.

    Note: If you installed this plugin prior to v2.0.0, it had a different name (ALOE_MobileUI). If you download the new one (ALOE_VirtualButtons), install it and playtest before removing the old one. It will copy the plugin parameters for you automatically. The playtest will automatically open the Console with further information and instructions.

    v2.0.0 (May 4 2019)
    • Clears input state on transfer to mitigate stuck DPad input bug
    • Improves clearing of input state each frame to mitigate bug
    • Fix bug where the DPad would not clear the direction after a parallel event checking for a input direction triggered a Show Choices event command
    • Buttons hidden via plugin command will stay hidden until the show plugin command
    • Key buttons can trigger common events
    • Option to use a "hot" image that shows when the button is pressed
    • Delay parameter to fade-in
    • Plugin command option to show all buttons
    • Plugin command option to hide all buttons
    • Plugin command to change button opacity
    • Add plugin parameter to toggle whether the buttons are hidden during dialogue
  4. @Aloe Guvner Woo, the update! Love all the new added features.

    I'm having another problem now involving the DPad. Key buttons and DPad Map movement work perfectly as intended (and I'm pretty sure the stuck input state thing is fixed now), but in any menu scene, i'm only able to press (or hold) a DPad direction once before pressing that direction permanently stops working for menu scenes.

    If it helps, I just tried testing this in a blank testing project and had the same result. I tested it once by copying my settings over from the older MobileUI plugin and once by starting from blank settings and also had the same result.

    Edit: For clarity, all keyboard controls still work, but DPad directional input (whether by clicking with the mouse or touch-screen control, I tested both) stops working in menus after the first press of a direction.
  5. That's really interesting, I remember testing the menus as well and didn't notice anything like that. Although there could've been certain settings that I didn't test.

    Unfortunately, I'm out of town for work for the week so I won't be able to look at it until the weekend.
  6. I *think* I figured out what's causing it (take what I say with a grain of salt because EVERYTHING I know about javascript is about fiddling with code until I get it to work somehow - in other words I have no idea what I'm talking about)

    It seems like defining _lastInput as an array and then pushing movements to that array somehow caused the issue I described. I only assume this because I basically replaced the DirectionalPad code from your new version with the code from your older version which solved the problem.

    However, this causes the "stuck map movement" bug to re-appear. I managed to fix this by adding the clearDpadInput function you added into the game's performTransfer function (instead of adding it to Game_Map.prototype.setup) like so:


    Code
    Code:
    Game_Player.prototype.performTransfer = function() {
        if (this.isTransferring()) {
            this.setDirection(this._newDirection);
            if (this._newMapId !== $gameMap.mapId() || this._needsMapReload) {
                $gameMap.setup(this._newMapId);
                this._needsMapReload = false;
            }
            this.locate(this._newX, this._newY);
            this.refresh();
            this.clearTransferInfo();
            ALOE.clearDpadInput();
        }
    };

    Not 100% sure this works yet but I've been testing it and haven't had the bug happen so far.
    I hope this helps!
  7. @Aloe Guvner excuse me. I just use rmmv now, and Im still blind. can you give me a demo to your plugin (this) ? because I so much interested with it but I don't know how to use it. I've tried this. I use RMMV 1.4.0
    upload_2019-5-7_4-33-28.png
    upload_2019-5-7_4-34-15.png
    upload_2019-5-7_4-34-36.png
    I use yanfly picture common for calling scene_menu and when the menu open I wanna use your plugin to select menu, back, etc. thanks before. I hope you replied it :)
  8. I am using this plugin with Mog's Chrono Engine, and everything seems to work just fine. Except, that I cannot figure out how to get a menu button on the Item subscreen. When I test it on touchscreen, I am unable to back out of the screen. What scene_ should I be using to put a button on a subscreen? Can I have a button that appears on every screen?
  9. jigida70 said:
    What scene_ should I be using to put a button on a subscreen?
    Normally, Scene_Item. But if Mog has changed what scene the items are in, then I'm not sure. You'd have to ask someone familiar with that plugin or look through the plugin to see if Mog named the scene something else.

    jigida70 said:
    Can I have a button that appears on every screen?
    That could be a good idea, added a Feature Request.
  10. Thank you.

    I did figure it out.
    ScreenShot
    upload_2019-5-13_18-3-22.png

    ScreenshotVirtualButtons.jpg


    I just have one more issue. If I try to push a directional button and a key button at the same time, it goes to the menu (because double touch goes to menu). Is there a work around on this?
  11. Released patch version 2.0.1:
    • Fix bug with DPad movement in menus

    Per @jkweath 's suggestions, added and tested those fixes, and it works now. I can only guess that because by tracking the DPad directions in an array, there was an issue with a 'pass by reference' somewhere. Using a string instead works, so I don't really feel like identifying the true root cause.

    jigida70 said:
    If I try to push a directional button and a key button at the same time, it goes to the menu (because double touch goes to menu).

    This is due to how MV was coded to handle input, as you noticed, double-touch does the same thing as pressing 'esc' or right-click. You can look at the "TouchInput._onTouchStart" function inside rpg_core.js to see how it calls _onCancel when there is more than 1 touch.

    This plugin won't change the internals of how MV handles touch input, the purpose of this plugin is to create buttons that can be touched. Some additional explanation here.
  12. Nice plugin and it will be better if the developer adds multi-touch functionality in the future
  13. Hey, I absolutely love your plugin.. its easily the cleanest one out there. All its missing is multi touch. Is this something you could do? I will be happy to donate :)
  14. Regarding multi-touch, I'll say it again:

    • This plugin creates a user interface. It does not modify the core mechanics of how MV handles touch
    • If you have another plugin already that enables multi-touch, and you have a compatibility issue, you can describe that issue and I'll do my best to make it compatible
    Aloe Guvner said:
    The base RPG Maker MV code automatically uses the "cancel" function when there is a multi-touch. You can test this by touching the map with 2 fingers on a project with no plugins, and the menu will open.
    If you are asking me to write a plugin that will change the base behavior of the touch input to allow multi-touch, then sorry, but I won't do that inside this plugin. This plugin is meant to focus on the the User Interface, not to change the way that input is handled. If some other plugin exists for multi-touch, it may be compatible with this plugin.

    Aloe Guvner said:
    Same answer I just gave to TenTranVN - MV does not support multi-touch by default. The base RPG Maker MV code automatically uses the "cancel" function when there is a multi-touch. You can test this by touching the map with 2 fingers on a project with no plugins, and the menu will open.
    This plugin is meant for the User Interface, I would consider a core change to how touch input is gathered not to be in the scope of this plugin.

    If you find a multitouch plugin that is not compatible, you can post it here along with a detailed description of the issues you're facing and I'll try my best to make it compatible.
  15. Hello and thanks for the plugin! This looks like it will come in handy but I did run across a few issues, so added a feature request to your github.
  16. Hi! @Aloe Guvner

    Is there a way that when i use the plugin command to hide or show the buttons, they stay permanent when switching maps(I mean only the transitions between Scene_Map to Scene_Map)?

    Because when i use it to hide, and then change the map, they appear again even if i don't use the show command.
    Also, if i hide them and open the menu, then i close, they appear again in the scene_map.

    Making them appear again between Scene Transitions is ok for me, it also great!
    But, if there is a way to make that not happening only between Scene_Map to Scene_Map...

    First i though to achieve this making the plugin command permanent. For example:
    If i hide only the DPAD, it will be hide in all scenes, even different ones.

    I made a parallel event with the commands to hide in there. But if i change maps, they would still appear and desappear quickly.

    Thanks for the implementation of opacity! ^^

    [EDITT]
    I manage to change the code and acomplish what i want!
    Can forget about what i say ^^
  17. @Kest I see the feature request, it's a good idea. I have to think about the best way to implement it, many HUDs use "eval" for the condition every frame - using eval 60x per second is really slow so I'd like to think of a better way.
  18. How to display different buttons in different map ID?
  19. how to disable touch mode and on D-pad mode when Window_EventItem (Select item)