x


Entering Window Text

Hi all, and I apologise in advance for what is probably a pretty stupid question.

How do I enter text into a GUI window?

function WindowFunction (windowID : int) {
// Draw any Controls inside the window here
}

I can create the window and put text into the banner, but I'm not sure how to enter the body text. I assume I put text into the space left, my question is simply how? (How should it be typed in?) I'm a bit of a java noob, so it's probably a simple answer.

I'm using code from the unity reference page, but I can't quite understand where I'm supposed to actually put the main text and what syntax to use.

Thanks in advance for any help :)

more ▼

asked Apr 05, 2010 at 08:04 PM

7rigger gravatar image

7rigger
7 9 7 12

(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest

I'm not really sure what you mean by "body text". A label?

function WindowFunction (windowID : int) {
    GUILayout.Label("Hi");
}
more ▼

answered Apr 05, 2010 at 11:30 PM

Eric5h5 gravatar image

Eric5h5
114k 59 216 715

I meant the text, or image that would appear inside the window. Your code does exactly what I wanted (despite my confusing question!) so thank you very much for the help. :)

Apr 06, 2010 at 10:22 AM 7rigger
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x6084
x5044
x312

asked: Apr 05, 2010 at 08:04 PM

Seen: 2328 times

Last Updated: Apr 05, 2010 at 08:04 PM