+ 1
ModPE set BG of GUI to image
How can I set the background of the GUI to an image from the same local folder as the .js file? The code from the docs app doesn't work, but I don't get any errors..
2 Réponses
+ 7
Please check the syntax...
or you can post your code that doesn't work here
0
So I get the image like this: (this is what the docs say)
var directory = new BitmapFactory.decodeFile("./logo.png");
var img = new BitmapDrawable(directory);
And then I can do ex.:
var image = new ImageButton(ctx);
image.setBackgroundDrawable(img);
But then instead of the image it's just an empty small button, or a transparent bg.