Blockland Forums > Modification Help
MessageVectors
(1/2) > >>
lilboarder32:
What exactly are messageVectors? Is there any documentation I can find on them? Are they useful?
Iban:
I've never even heard of them. Give an example.
lilboarder32:
I was playing with GUI stuff and saw GuiMessageVectorCtrl as a control and checked out the methods of it. It has attach and detach as methods with the arg being a "MessageVector Item".
Destiny/Zack0Wack0:
I wasn't aware of them either, but apparently they're just a way to handle multi-line text other than ML-text controls. RTB IRC Client uses them.
You have to make a messageVector object using:

--- Code: ---new MessageVector(YourMessageVector);

--- End code ---
You also need a GuiMessageVectorControl in a GUI, then you need to attach the messagevector object to the GUI control:

--- Code: ---YourMessageVectorControl.attach(YourMessageVector);

--- End code ---


Then you can use this to add lines:

--- Code: ---YourMessageVector.pushBackLine("Hello this is a line that will appear in YourMessageVectorControl",0);

--- End code ---
I'm not exactly sure what other methods there are (it has no proper dump method), but I found these:
pushBackLine("text",0); - add a line at the bottom
pushFrontLine("text",0); - add a line at the top
popBackLine() - remove the line at the bottom
popFrontLine() - remove the line at the top
Red_Guy:
you can also try here:
http://docs.torquepowered.com/tge/official/content/documentation/Engine/Reference/classGuiMessageVectorCtrl.html

See if that gives you any more info
Navigation
Message Index
Next page

Go to full version