设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 76|回复: 0

[转载发布] Virtual Buttons and DPad

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29925
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38778

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    Virtual Buttons and DPad
    by Aloe Guvner
    Download Link


    Note: This plugin is not under active maintenance.

    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
    }
    Spoiler: Use Case example #1
    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).

    Spoiler: Use Case example #2
    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).

    Spoiler: Use Case example #3
    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.

    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


    本贴来自国际rpgmaker官方论坛作者:Aloe Guvner处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/virtual-buttons-and-dpad.94196/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 02:33 , Processed in 0.121607 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表