Search Unity

Simplest way to make a textbox?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Iron-Warrior, Aug 30, 2010.

  1. Iron-Warrior

    Iron-Warrior

    Joined:
    Nov 3, 2009
    Posts:
    838
    Hullo GUIers,

    Bear in mind that I'm horribly inexperienced when it comes to Unity's GUI functions. Right now, I have a little ability selection bar where you pick various abilities and I want a short explanation of each ability to appear when you click on it. Basically, I want to be able to make a box that is filled with text and auto-formats itself (including line jumps), and I want to be able to place it at certain coords on the screen.

    Was looking at things like GUILayout and it's various functions, but I can't seem to find a simple explanation on what I should do here. I know there should be a way I can define a rectangle (say 300 by 300, for example) then insert a string into it. When the string is longer than 300, it skips a line and continues. Also, is there any way in a string to force a line skip? I vaguely remember that it was something like \n in python, but it doesn't seem to work here...

    Thanks for any help!
     
  2. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
  3. Iron-Warrior

    Iron-Warrior

    Joined:
    Nov 3, 2009
    Posts:
    838
    Aight, guess I'll peruse the various GUI tutorials, and read the PDF from the Unite conference. I s'pose I'd have to learn the GUI tools sooner or later, but looking at some of the functions, I can't help but imagine a wonderful drag and drop GUI tool...thanks for the help!
     
  4. averysmarttardigrade

    averysmarttardigrade

    Joined:
    Sep 18, 2019
    Posts:
    11
    I know this post is very old, but if you're still struggling, I have a couple suggestions.
     
  5. SisusCo

    SisusCo

    Joined:
    Jan 29, 2019
    Posts:
    1,331