- Home /
Question by
Gords--- · Aug 04, 2013 at 05:47 PM ·
button backround
How to make a GUI Button with texture display full screen picture when clicked?
I'm trying to make a GUI button with small photo as a texture display a full screen version of the photo when the button is clicked. The button with the attached texture is not a problem, but displaying the full screen photo is not working. I'm using Javascript and heres the code I've got so far
var Texture1 : Texture;
function OnGUI() {
if (GUI.Button(Rect(1250,200,200,200),Texture1)) {
}
}
I've tried using GUI.DrawTexture in a few different ways but I just keep getting errors. Hope someone can help and thanks a lot in advance.
Comment
Best Answer
Answer by youngapprentice · Aug 04, 2013 at 05:49 PM
I suggest you use a GUITexture and size it the the screen you are using. Then create a boolean to use as a toggle to enable / disable it, and link that boolean to the button.
If you find that is answer solved your problem, please mark it as answered! :)