Galv's Screen Buttons

i would say youre missing something as ive been using it since 1.3 and now im using 1.6 (yes, i havent downgraded, havent needed to) and its working perfectly for me. try and get the buttons to do something else and see if it works.


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.
I seem to have encountered an issue.

I have created custom buttons, but only half the buttons' images are showing, the top half to b precise. I cannot seem to figure out what caused this, nor how to correct it. Does anyone have an idea as to what the problem might be?
The button is made up of normal and pressed images. It sounds like you only have a single button in your image. See the demo button graphics as an example.
I seem to have encountered an issue.

I have created custom buttons, but only half the buttons' images are showing, the top half to b precise. I cannot seem to figure out what caused this, nor how to correct it. Does anyone have an idea as to what the problem might be?


I had this exact error and it took me ages to figure it out... it seems galv has set it that it must have 2 images. 1 for normal, 1 for press. all i did was create the same image size & only use half of the image area and leave the bottom half blank (or you could duplicate the image)
Hello Galv,

First, thank you to make this great work, i use several plugins that you've made, they are very useful.

Please can you tell me how i can remove some buttons? I want to remove buttons when a menu is closed, but keep the other buttons on screen.
Thank you for reply, and sorry for my english.
Hi Galv,
Do you know how I can remove only some specifics buttons and not all (with hide)? Thank you!
Hey Galv. I'm using your plugin and first of all - thank you very much for putting so much effort into this. Now for some reason, when I add new images to /img/system/, they will not usable for a button image - the button is invisible and also will not detect a click. This even occurs (in your test project) when I just copy a button and change the name slightly - I will not get it to recognize the copy. Did this problem ever occur to you or have you heard from anyone?


EDIT: Got an answer from Galv - thank you, that fixed the problem!
"You need to add the button graphic's name to the "Precache Buttons" setting.
Note in the demo the demo buttons are added already. You'll need to add any new ones following the demo as an example using the filename (without file extension)."
Hi! How can I add a button to simulate, for example, the Z on my keyboard?
Is it possible to press two buttons at the same time without bringing up the game menu / cancel action?

For example, hold a button mapped to 'shift' together with up/down/left/right button(s) to make the player sprint.
Hey can you disable just one button, instead of hiding all of them?

I really need to just disable a single button not all of them
Hello Galv,

First, thank you to make this great work, i use several plugins that you've made, they are very useful.

Please can you tell me how i can remove some buttons? I want to remove buttons when a menu is closed, but keep the other buttons on screen.
Thank you for reply, and sorry for my english.

Hi Galv,
Do you know how I can remove only some specifics buttons and not all (with hide)? Thank you!

Hey can you disable just one button, instead of hiding all of them?

I really need to just disable a single button not all of them
To remove button, you just need to replace "add" with "remove" like this,

Galv.SBTNS.removeButton(1,'map','BtnOk',570,500,['button','ok']);

inplace of,

Galv.SBTNS.addButton(1,'map','BtnOk',570,500,['button','ok']);
One more thing, in case someone needs it, if you activate this plugin in between a
save game. Your saves would no longer be compatiable. To make it work, you need to add this line

$gameSystem._gBtns = [];

before line 272 which is,

for (var i = 0; i < $gameSystem._gBtns.length; i++) {
if (Galv.SBTNS.canHasButton(i)) {
this.createGBtn($gameSystem._gBtns);
}
}
=============================================
so overall the NEW code will be like this,

$gameSystem._gBtns = [];
for (var i = 0; i < $gameSystem._gBtns.length; i++) {
if (Galv.SBTNS.canHasButton(i)) {
this.createGBtn($gameSystem._gBtns);
}
}
Can I use it on my mobile phone/web?
Why is there no button displayed? I tried...

-----------------------------
FTP - Server:
問題.png

-----------------------------
Event - one page:
Galv.SBTNS.addButton(0,'map1','BtnUp',70,440,['button','up'])
Galv.SBTNS.addButton(1,'map1','BtnDown',70,560,['button','down'])
Galv.SBTNS.addButton(2,'map1','BtnLeft',10,500,['button','left'])
Galv.SBTNS.addButton(3,'map1','BtnRight',130,500,['button','right'])
Galv.SBTNS.addButton(4,'map1','BtnOk',570,500,['buttonT','ok'])
Galv.SBTNS.addButton(5,'map1','BtnCancel',690,500,['buttonT','cancel'])
Galv.SBTNS.addButton(6,'map1','BtnCancel',690,500,['button','shift'])

var key = [1, 2, 'A'];
$gameSelfSwitches.setValue(key, true);
-----------------------------
It doesn't work...
help me~~😅
Can I use it on my mobile phone/web?
Why is there no button displayed? I tried...

-----------------------------
FTP - Server:
View attachment 203436
-----------------------------
Event - one page:
Galv.SBTNS.addButton(0,'map1','BtnUp',70,440,['button','up'])
Galv.SBTNS.addButton(1,'map1','BtnDown',70,560,['button','down'])
Galv.SBTNS.addButton(2,'map1','BtnLeft',10,500,['button','left'])
Galv.SBTNS.addButton(3,'map1','BtnRight',130,500,['button','right'])
Galv.SBTNS.addButton(4,'map1','BtnOk',570,500,['buttonT','ok'])
Galv.SBTNS.addButton(5,'map1','BtnCancel',690,500,['buttonT','cancel'])
Galv.SBTNS.addButton(6,'map1','BtnCancel',690,500,['button','shift'])

var key = [1, 2, 'A'];
$gameSelfSwitches.setValue(key, true);
-----------------------------
It doesn't work...
help me~~😅
try this, before you run your event. create an autorun event on map1 which runs before your code, like this,

Galv.SBTNS.addButton(0,'map1','BtnUp',70,440,['button','up'])
Galv.SBTNS.addButton(1,'map1','BtnDown',70,560,['button','down'])
Galv.SBTNS.addButton(2,'map1','BtnLeft',10,500,['button','left'])
Galv.SBTNS.addButton(3,'map1','BtnRight',130,500,['button','right'])
Galv.SBTNS.addButton(4,'map1','BtnOk',570,500,['buttonT','ok'])
Galv.SBTNS.addButton(5,'map1','BtnCancel',690,500,['buttonT','cancel'])
Galv.SBTNS.addButton(6,'map1','BtnCancel',690,500,['button','shift'])
Galv.SBTNS.removeButton(0,'map1','BtnUp',70,440,['button','up'])
Galv.SBTNS.removeButton(1,'map1','BtnDown',70,560,['button','down'])
Galv.SBTNS.removeButton(2,'map1','BtnLeft',10,500,['button','left'])
Galv.SBTNS.removeButton(3,'map1','BtnRight',130,500,['button','right'])
Galv.SBTNS.removeButton(4,'map1','BtnOk',570,500,['buttonT','ok'])
Galv.SBTNS.removeButton(5,'map1','BtnCancel',690,500,['buttonT','cancel'])
Galv.SBTNS.removeButton(6,'map1','BtnCancel',690,500,['button','shift'])
erase event;

Then after this code, do your event.

Also where are you running the code, during game start or at later. u need to put the suggested code before your code.
How disable button hiding during loop, if Its possible.

Original thread: https://forums.rpgmakerweb.com/threads/galvs-screen-buttons.72291/