+ 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..

26th Oct 2019, 12:44 PM
Paul Grasser
Paul Grasser - avatar
2 Respostas
+ 7
Please check the syntax... or you can post your code that doesn't work here
29th Oct 2019, 7:00 AM
MCGAmedCoder gamerArtist
MCGAmedCoder gamerArtist - avatar
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.
29th Oct 2019, 7:08 AM
Paul Grasser
Paul Grasser - avatar