Creating an in-game Journal using GuiMessageVectorCtrl
by Nick Zafiris · in Torque Game Engine · 01/05/2005 (4:40 am) · 25 replies
I'm trying to have all game messages and conversations get pushed into a Journal like in many RPGs.
My .gui file hierarchy is set-up like this:
GuiControl(journalDlg)
GuiWindowCntrl(journalWindow)
GuiScrollCtrl(journalScroll)
GuiMessageVectorCtrl(journal)
So far I've managed to get messages display on the GuiMessageVectorCtrl by attaching a messageVector and pushing lines i.e. pushBackLine("Journal Message", 0).
Problems I've encountered so far:
1. If you do a popDialog(journalDlg) and then a pushDialog(journalDlg) all text gets lost. Is there a way to have the text persist or at least dump it somewhere and re-insert it again when the gui is pushed?
2. It seems that the way the messageVector is designed, you can only use pushBackLine when the gui has been pushed. Anyone know of a way to override that? I guess you can set all controls to setVisible(false) but that gets messy and then you would also have to mess with the noCursor variable.
Any help would be appreciated. Also, anyone think I shouldn't use GuiMessageVectorCtrl for this but use GuiMLTextCtrl or something else instead?
Thanks,
Nick
My .gui file hierarchy is set-up like this:
GuiControl(journalDlg)
GuiWindowCntrl(journalWindow)
GuiScrollCtrl(journalScroll)
GuiMessageVectorCtrl(journal)
So far I've managed to get messages display on the GuiMessageVectorCtrl by attaching a messageVector and pushing lines i.e. pushBackLine("Journal Message", 0).
Problems I've encountered so far:
1. If you do a popDialog(journalDlg) and then a pushDialog(journalDlg) all text gets lost. Is there a way to have the text persist or at least dump it somewhere and re-insert it again when the gui is pushed?
2. It seems that the way the messageVector is designed, you can only use pushBackLine when the gui has been pushed. Anyone know of a way to override that? I guess you can set all controls to setVisible(false) but that gets messy and then you would also have to mess with the noCursor variable.
Any help would be appreciated. Also, anyone think I shouldn't use GuiMessageVectorCtrl for this but use GuiMLTextCtrl or something else instead?
Thanks,
Nick
#22
03/31/2005 (9:00 pm)
I would love to see the resource you made of this... Any idea where you put it?
#23
04/12/2005 (5:02 pm)
I too would love to know =)
#25
Note: there is one very minor bug... I should have it fixed in a day or two...
04/21/2005 (7:17 pm)
Thx for covering my back Dirk :) Been stranded away in T2D forum land lol...Note: there is one very minor bug... I should have it fixed in a day or two...
Torque 3D Owner Matthew Langley
Torque