Hi, if i add another button (2 buttons in total) will i use buttonWindow for button2 and layout for button2 ? Or buttonWindow and layout for button1 and buttonWindow2 and layout2 for button2 ?
Hi, if i add another button (2 buttons in total) will i use buttonWindow for button2 and layout for button2 ? Or buttonWindow and layout for button1 and buttonWindow2 and layout2 for button2 ?
Hi I am having trouble with bitmaps. I have tried copying the code from beatz_unknown's bitmap template and replacing the standard button code with it. That gave me an error. Where do I put the code? I want to display a image on the screen.
If you want to make another button, coppy the button code and paste it after you do GUI variable.addView(button vairable); you don't need to create another gui variable, but changer the butt on variable to something like button2 or a name for what your button does. Beatz_unknown's gui templates can be very helpful.
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
:D: <--- That's a happy and a sad face
Add the both buttons to the same layout
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
Thanks!
menuLayout.addView(button);
var button = new android.widget.Button(ctx);
button.setText("");
button.setOnClickListener(new android.view.View.OnClickListener({
onClick: function(viewarg){
} }));
What am I doing wrong? I think its the variable being set every time, but i do not know how to call a variable
Great Tutorial! can you please tell me how to add image on background
Can u help me create a button that when u hold it, it will do something? Plz help