(SOLVED) Word Wrapping for Text Boxes (Listbox, Label, or Textbox?)

Started by Vault15, Wed 31/10/2012 23:17:49

Previous topic - Next topic

Vault15

I had found a few posts on this subject, but I can't seem to get where I need to be and I'm a bit confused.

TextArea Module v0.0.1.1 BETA (Multi-line textboxes)
http://www.adventuregamestudio.co.uk/forums/index.php?topic=34560.msg451995

Description Module:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=26306.0

and this MultiTextBox v1.00 Module (Handle multiple text boxes)
http://www.adventuregamestudio.co.uk/forums/index.php?topic=26539.msg335878#msg335878

All I'm doing is making it so that when I click a button in the gui, let's say "Strength", then it will display "Your ability to carry lots of equipment blah blah" in a text box area at the bottom right of the screen. I can get it to do that, but of course it's just 1 line that trails off the screen.

I'm just wondering what the most efficient way would be to get this done. I also don't want another text box filling up unrelated ones. Right now if I type in the character's name then it will also fill the description box until I click on "strength" and it's cleared.


Should I use one of these modules or am I just making it more complicated than it is? My prediction is that I should use a text box to enter the character name and a separate listbox for the description box (info for each button). Sorry, I can't always figure out if a module is exactly what I need or if it's not necessary.

It seems like I'll need one of these modules since you can only have 1 text box displayed at a time (from what I've tried). I don't want to disable one at any time, I need them both to display at once.


Important note: The MultiTextBox Module gives me an error just running the game after. It says:
"
Error(line 55): Array size must be constant value

struct MultiTextBox {
  import static Label *HighlightCloseLabel(GUIControl *gc, int color);
  TextBox *stack[AGS_MAX_GUIS];

"


Incase all of that mess confused you, I'm just asking what any of you would do to solve two problems:

1. Text boxes don't wrap and just make a straight line off the screen"
2. I can't have multiple independent text boxes without a module (from what I can tell). So should I use listboxes or somehow set a label to display different wrapped text for each button (strength, dexterity, etc)?



Thanks in advance!

Khris

To display text, all you need is a label, and those wrap text. And of course you can display lots of labels simultaneously.

A textbox is meant to allow the player to enter text and since those don't wrap text, monkey's module basically replicates a textarea like the one I'm typing this post in right now. But again, all you want is show text.

You keep making this much more convoluted than necessary for yourself because you don't know enough to go down the right path but just enough to get lost going down the wrong one.
Don't you think the time it took to write your post and search for modules could've been spent better reading the manual throughly, getting a decent grip of what's possible with native methods and what isn't, especially when seeing that this keeps happening to you...?

No offense.

Vault15

Quote from: Khris on Thu 01/11/2012 00:13:11
To display text, all you need is a label, and those wrap text. And of course you can display lots of labels simultaneously.

A textbox is meant to allow the player to enter text and since those don't wrap text, monkey's module basically replicates a textarea like the one I'm typing this post in right now. But again, all you want is show text.

You keep making this much more convoluted than necessary for yourself because you don't know enough to go down the right path but just enough to get lost going down the wrong one.
Don't you think the time it took to write your post and search for modules could've been spent better reading the manual throughly, getting a decent grip of what's possible with native methods and what isn't, especially when seeing that this keeps happening to you...?

No offense.

No, no I agree I'll look more into the manual and stop posting for awhile. I just have a lot of other things going on besides the project and got myself confused looking through the modules. I wasn't sure if they would benefit me to make my life easier, but hey if it's as easy as that then there you go. Next time I'll make sure and not assume that it's more complicated. The reason why I thought that though was from the posts I had come across recommending using listboxes. I don't know, but I'll try not to ask anymore stupid questions, as well as research into it more with the manual. Sorry about that, Khris. Last thing I wanna do is waste anyone's time, I assure you.

Khris

I don't want to discourage you from posting but you have a habit of jumping to ( wrong ) conclusions. Regardless of the solutions you found, you were looking for a way to solve an imaginary problem, that's the issue here.
You aren't bothering me btw. You're trying to fix your problems on your own before posting here and you aren't breaking any rules. So don't refrain from posting because of me; when I'm not in the mood I simply won't post in your threads.

(One thing though: don't quote my entire post each time, your reply is going to end up beneath my post anyway, isn't it? If I had a nickel...)

SMF spam blocked by CleanTalk