Galv's Screen Buttons

Discussion in 'JS Plugin Releases (RMMV)' started by Galv, Dec 15, 2016.

    Tags:
  1. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A

    Screen Buttons - Version 1.3
    RPG Maker MV Plugin
    Galv



    Introduction
    Screen buttons for clicking and touching.


    Screenshot
    [​IMG]


    Features
    Add buttons to the screen on specified or all maps that can be set to emulate button presses, run script code or run a common event (press and hold or triggered). Create or remove any number of buttons during the game.Includes a setting to disable map mouse-click movement if you wish to use buttons for arrow keys (example in demo).Can enable/disable buttons during game or have buttons disappear or stay during events such as ‘Show Text’ dialogue.Keyboard can not control these buttons, they are for mouse or touch activation only.


    How to Use
    - Copy the "Galv_ScreenButtons.js" file into your project's /js/plugins/ folder.- Activate plugin using the 'Plugin Manager'- Read the help file and examine the demo to learn how it works


    Plugin
    Get it here


    Credit and Thanks
    - Galv


    Terms
    Free to use in any RPG Maker MV project including commercial. Please credit "Galv". :)


    Updates


    2017-01-06 - Version 1.3 - fixed a bug with mouse move not disabled and no button in index 0


    2016-12-15 - Version 1.2 - fixed a bug I created when fixing last bug when dragging off of a pressed button.


    2016-12-13 - Version 1.1 - fixed a bug with mobile touch going into menus
    2016-11-30 - Version 1.0 - release 
     
    Last edited by a moderator: Jan 7, 2017
    #1
    Guiguimu, Rpg Guy, Alastor01 and 4 others like this.
  2. Legendarios

    Legendarios Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    Spanish
    Can it show the buttons also in the menu? I would like to display a Cancel button on the menu.
     
    #2
  3. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    Not at the moment, sorry - only on maps.
     
    #3
  4. TheChilliPL

    TheChilliPL Villager Member

    Messages:
    23
    Likes Received:
    3
    First Language:
    Polski [Polish]
    This is strange. My buttons disappears when I'm opening menu and closing it
     
    #4
  5. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    #5
  6. luiscesjr

    luiscesjr Veteran Veteran

    Messages:
    117
    Likes Received:
    11
    First Language:
    Portuguese
    Galv, is there a way to use this with your diagonal movement plugin? 

    Code:
    addButton(0,'map','Btnx',x,y,['button','up''right']);


    Obviously this would not work, but is it possible


    any other way?
     
    #6
  7. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    I didn't think about diagonals.


    You can stack buttons and pressing them would press all buttons in the stack, however I am unsure if this would work in this case I have not tested.
     
    #7
    luiscesjr likes this.
  8. luiscesjr

    luiscesjr Veteran Veteran

    Messages:
    117
    Likes Received:
    11
    First Language:
    Portuguese
    Oh that did work! Amazing... I didn't think about this, now to make the diagonal buttons... =D


    Screen.png
     
    #8
  9. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    Updated to version 1.3 - fixed a bug when mouse movement wasn't disabled via the plugin and there was no button with index 0
     
    #9
  10. Lithalean

    Lithalean Veteran Veteran

    Messages:
    39
    Likes Received:
    35
    Location:
    Los Angeles, CA
    First Language:
    English
    Hello Galv,

    I'm using a number of your plug-ins, in my iOS game.

    When attempting to use this in place of a somewhat complex scheme using Yanflys picture common events, I run into an issue.

    I should also mention I'm using Quasi Movement, and the common events are

    Set Movement Route : Player (Skip)
    Qmove (8,1,32)

    That's up, and when using yanflys PCE if I hold the button down, the character will continually move. If I use your plug in, the character will move one step, then I'll need to hit the button again.

    Thanks for any help, and all the work you have done for the community thus far!
     
    Last edited: Apr 18, 2017
    #10
  11. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    You're using common event on button press? I believe I set the button up to trigger common event, not to be able to hold down to continuously run common event.


    Have you tried using the script's emulation of button press?
     
    #11
  12. Lithalean

    Lithalean Veteran Veteran

    Messages:
    39
    Likes Received:
    35
    Location:
    Los Angeles, CA
    First Language:
    English
    @Galv 
    Yes I'm using common events on button presses. You do have it set up so it will trigger common event and not continuously run it. I'm asking could you make a small modification / setting so it would continuously run it. I also can't use the scripts emulation of button presses because that defaults to MV's regular movement, and my game uses Quasi's pixel based movement.
    Basically, I like the flexibility of this:
    Screenshot at Jan 25 11-10-24.png
    And want to combine it to make some type of hybrid with this.
    Screenshot at Jan 25 11-11-28.png
    Screenshot at Jan 25 11-06-00.png
    Also in the video, in order to get the buttons to change color like that, I was using a tint/untint picture (every sec). So even though it blinks, it was a continual hold. This is more taxing on engine than a simple change of picture you have implemented in your plugin.
     
     
    Last edited by a moderator: Jan 26, 2017
    #12
  13. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    No, I asked:



    Because it doesn't use MV's regular movement, it emulates actually pressing the arrow keys. It works with tests I have done in Quasi's pixel movement.
     
    #13
  14. ha1lyeah

    ha1lyeah Villager Member

    Messages:
    5
    Likes Received:
    0
    Hi,
    how to add an image to toggle this plugin on and off? So during the game, the player can select to use the buttons on the screen or the default touch option.
     
    #14
  15. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    You would just add or remove the buttons with the basic script calls given in the plugin instructions. You could make a button that calls a common event that turns them on or off.
     
    #15
  16. mpurnell

    mpurnell Veteran Veteran

    Messages:
    82
    Likes Received:
    10
    Location:
    Australia
    First Language:
    english
    -- Deleted original post as fixed(personal error) --
     
    Last edited: Oct 9, 2017
    #16
  17. peq42_

    peq42_ Yeet Veteran

    Messages:
    465
    Likes Received:
    274
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    No matter what I do, it doesn't work on MV 1.5.2 .

    I used the demo as example to try make this button to work, but it simply doesn't. And there's no reason why.

    Code:
    Galv.SBTNS.addButton(7,'map','Btnclose',340,180,['script','$gameSwitches.setValue(30,true)'],255);
    Galv.SBTNS.addButton(7,'map','Btnclose',180,340,['script','$gameSwitches.setValue(31,true)'],255);
    I've put it inside a event exactly equal the one in your demo, but it doesn't work. I tried making it parallel, no success(It only draw the button when on parallel process, but still not work). Even if I copy everything to my game directly from demo it doesn't work.
     
    #17
  18. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    There's always a reason why.

    You need a unique id for each button. Both of your buttons have the same (7).
    Make sure the button graphic actually exists, in the case of your script calls, /img/system/Btnclose.png.
    Make sure that you have added your buttons to the precache setting.
     
    #18
    mpurnell likes this.
  19. peq42_

    peq42_ Yeet Veteran

    Messages:
    465
    Likes Received:
    274
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    I tried with different IDs too(That one I posted was my 4th attempt or something to make it work, I copy-pasted the code directly from another event but forgot to change. Even changing it didn't make things work), triple checked image names and added it.

    Also, as i said, even a direct copy of your demo settings, objects and images,etc into my project didn't work. The best I managed to do was making the button appear, but it wouldn't do anything.
     
    #19
  20. Galv

    Galv Veteran Veteran

    Messages:
    1,176
    Likes Received:
    1,115
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    Here's a list of other suggestions to try:
    https://galvs-scripts.com/errors-using-plugins/

    Also, try creating a button and seeing if you can understand how it works instead of copy+pasting. You may be missing something or not changing something that needs to be changed for your project.
     
    #20

Share This Page