Virtual Buttons and DPad

mariov.clanasda

Villager
Member
Joined
Nov 12, 2015
Messages
6
Reaction score
0
First Language
Indonesian
Primarily Uses
Hello @Aloe Guvner

I just Installed your plugin, and thank you so much for great Plugin

I made 4 buttons in scene_map :
  1. DPAD
  2. Action (Key Button to speak with NPC etc)
  3. Escape/ Back Button (Key button to open Scene_menu)
  4. Control button to hide/Show button.
They are worked fine for now but I noticed 3 bugs
  1. Control Button triggered Back button (go to Scene_menu) when I wanted to show all hidden buttons.
  2. In second trial to hide and show all buttons of bug 1 , this issues also triggered "stuck Up button" bug where Main character walk to up/ North and never stop till we touch DPad Up
  3. To solve both bugs above, I tried to only hide/show Action and DPad button and keep Back Button appears. both bugs above are solved, but if I hide buttons and tried to open dialog, the Back Button disappear after the dialog finished. To make Back button appear, I must go to scene_menu by double finger tap the screen
do you any idea for solving the bugs?
 

CropseFather

Villager
Member
Joined
Aug 5, 2018
Messages
17
Reaction score
5
First Language
English
Primarily Uses
RMMV
Is everyone using their own dirpad images? or is there provided ones?
 

AmareusRedink

Warper
Member
Joined
Feb 3, 2020
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
Other
no demo for test?
 
Last edited:

tseyik

Villager
Member
Joined
Oct 22, 2015
Messages
18
Reaction score
18
First Language
English
Primarily Uses
Is everyone using their own dirpad images? or is there provided ones?
Collected pictures
001.jpg
 
Last edited:

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
601
Reaction score
197
First Language
Vietnamese
Primarily Uses
RMMV
Anyone using this plugin has problem with show/hide button commands?
I defined 2 Key Buttons, each with its own unique name ("Lamp" and "Tool"), and hide them all from the beginning of the game. However, when I use plugin command
Code:
virtualbuttons show Lamp
or
Code:
virtualbuttons show Tool
All two buttons are shown instead of one. I just want to show a certain key button at a time, not all.
 

TenTranVN

Veteran
Veteran
Joined
Apr 13, 2017
Messages
165
Reaction score
17
First Language
Vietnam
Primarily Uses
RMMV
When hidden and visible, it will not be 100% hidden, it will only hide 90%
 

Al-Farizi

Lv 87 Warrior
Member
Joined
Oct 2, 2019
Messages
27
Reaction score
1
First Language
English
Primarily Uses
RMMV
Virtual Buttons and DPad
by Aloe Guvner
Download Link
(Instructions: right-click the "Raw" button and click "Save Link As...")​

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.

Background:
This plugin focuses on improving the user interface for mobile games created in RPG Maker MV, by allowing the developer to have virtual buttons on the screen that interact with touch input.

The emphasis is on maximum flexibility for the developer, you can add as many or as few buttons as you want to the screen, and you can add these buttons on whichever screens you would like (i.e. map, menu, credits, title, etc.).


Functionality:
This plugin can create 3 different types of buttons:

1.) Directional Pad
  • A single picture which is used for up, left, right, and down movement (also support diagonal movement when combined with a Diagonal Movement plugin).
  • You control what scenes the DPad appears in.
  • This button is optional.
2.) Key buttons
  • These buttons can be used to represent any key. Common keys to use would be "ok" , "escape", "pagedown", "pageup".
  • These can be any key, and there can be as many or as few as the developer would like, and you control what scenes they appear in.
  • Buttons can run Common Events.
  • You can also write custom code that will be run when the button is pressed!
  • You may specify the type of input this button responds to:
    • Triggered: Execute once when pressed (default)
    • Pressed: Execute every frame while pressed
    • Repeated: After 24 frames, execute every 6 frames while pressed
    • Long Pressed: After 24 frames, execute every frame while pressed
    • Released: Execute once when button is released
3.) Control button
  • The control button, if pressed, will collapse and hide all other buttons on the screen.
  • If pressed again, it will expand and show all other buttons on the screen.
  • This allows the player to decide between using the virtual buttons or the standard touch input.
  • The scenes that this button appears in can be defined.
  • This button is optional.
Use Cases and Screenshots:

{clearly placeholder art below :D }
This example uses the DPad and two Key Buttons ("ok" and "escape") to put simple keyboard controls as virtual buttons on the map screen (Scene_Map).
View attachment 87593

This example uses buttons with the functionality of "pageup" and "pagedown" in the status screen. These buttons can be put in whichever screen you like. Page Up and Page Down move between actors in the menu, so this would make sense to go in the Status, Equip, and Skill screens (Scene_Status, Scene_Equip, Scene_Skill).
View attachment 87594

A virtual button can call custom Javascript code. If you are familiar with the engine, this can be extremely flexible and powerful.
In this simple use case, the item screen is opened by pressing the button.

View attachment 89999

Setup:
The setup requires a new folder to be created within the img folder of the project. This folder must be named "VirtualButtons".

Put all virtual button images in this folder, and then they may be accessed in the plugin parameters.

Plugin Commands:
* All plugin commands begin with VirtualButtons (MobileUI is also valid, for backwards-compatibility).
* All plugin commands are not case sensitive (i.e. "DPad" is the same as "dpad")
  • hide
    • Description: hides the specified button
    • Allowed arguments:
      • DPad
      • Any key button defined by you
      • Control
      • All
    • Examples:
      • VirtualButtons hide DPad
      • virtualbuttons hide Ok
      • MobileUI hide PageDown
  • show
    • Description: shows the specified button
    • Allowed arguments:
      • DPad
      • Any key button defined by you
      • Control
      • All
    • Examples:
      • VirtualButtons show DPad
      • virtualbuttons show Ok
      • MobileUI show PageDown
  • opacity
    • Description: change the opacity of a button
    • Allowed arguments:
      • DPad
      • Any key button defined by you
      • Control
      • All
    • Examples:
      • VirtualButtons opacity dpad 100
      • VirtualButtons opacity all 50

Terms of Use:

Free for use in commercial or non-commercial projects.
Credits required to: Aloe Guvner

Version History:
  • v2.0.1 (May 13 2019)
    • Fix bug where DPad input wasn't cleared in menus
  • 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
    • 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
    • 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
  • v1.4.0 (December 13 2018)
    • Added ability to configure which buttons are affected by the "control" button
    • Can be used to create dynamic menus
  • v1.3.1 (October 30 2018)
    • Added a parameter to control whether diagonal movement is detected as a possible fix for a hard to reproduce movement bug.
  • v1.3.0 (September 27 2018)
    • Added a parameter to choose to disable the normal touch input on any chosen scene. The only touch input enabled on these scenes is the virtual buttons.
  • v1.2.3 (September 27 2018)
    • Fixed a bug where buttons that the player had chosen to hide would reappear after a game message
  • v1.2.2 (September 27 2018)
    • Fixed a bug where buttons could be pressed before they were fully visible
  • v1.2.1 (September 27 2018)
    • Added an "instant" feature to hide/show for smoother cutscene transitions
  • v1.2.0 (August 26 2018)
    • Added ability to vibrate when button is pressed
  • v1.1.0 (June 27 2018)
    • Fixed bug with awkward player movement on the DPad
    • Added ability to specify the type of touch input on key buttons
  • v1.0.3 (May 14 2018)
    • Added ability to execute custom Javascript code when a key button is pressed
  • v1.0.2 (May 9 2018)
    • Added ability to play a sound effect when a button is pressed.
    • Fixed a bug where the parameters weren't read correctly due to plugin name change
    • Fixed a bug where the control button didn't hide the dpad properly
  • v1.0.1 (May 8 2018)
    • Added a version compatible with MV earlier than 1.6.0 using Babel.js
  • v1.0.0 (April 17 2018)
    • Initial release

Download Link
(Instructions: right-click the "Raw" button and click "Save Link As...")​
Can i change the page up button to the escape button?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just had a stranger SPRINT away from me in the grocery store. Talk about overreaction...
...I don't think I'm that ugly! ^-^
I wonder if I can go outside ye-

Government: lemme stop you right there
Alright, who's playing Jumanji? And whose turn is it?!
*Buys all the PVGames assets, ends up creating his own ground tiles.* At least I used the other types of graphics? Right? :kaoswt:

Forum statistics

Threads
95,503
Messages
929,657
Members
125,764
Latest member
KURAMAA0
Top