Quantcast
Channel: Questions in topic: "tips"
Viewing all articles
Browse latest Browse all 102

GUI scripting? continued

$
0
0
I posted yesterday about scripting and I tried to reply to that thread but it would not let me. I have a new strip of code and it seems to fit a little bit better to my needs, but I need to know how to add buttons and other elements of a GUI rather than a label. So if anyone can give me any tips to adding different GUI elements (buttons especially) using this method of GUI i would be extremely grateful. CODE BELOW! var information: String; private var guiOn = false; private var rect: Rect; function OnMouseDown () { guiOn = true; rect = Rect(Screen.width/2-50,Screen.height/2-50,200,200); yield WaitForSeconds(10); guiOn = false; } function OnGUI () { if (guiOn){ GUI.Label(rect, information); } }

Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>