guiConsoleTextCtrl - supporting multiple instances
by cabal_danien · 11/30/2006 (1:20 pm) · 1 comments
Download Code File
If you have a clean copy of Torque 1.5, replace guiConsoleTextCtrl.* with the ones in this resource. Otherwise, perform a diff to see what changed.
The method used here is derived from GuiTextCtrl, where each instance has its own buffer.
Essentially, it replaces instances of
with
in guiConsoleTextCtrl.h and makes appropriate changes in guiConsoleTextCtrl.cc to make it work (with a string copy of the evaluated results into the buffer).
If you have a clean copy of Torque 1.5, replace guiConsoleTextCtrl.* with the ones in this resource. Otherwise, perform a diff to see what changed.
The method used here is derived from GuiTextCtrl, where each instance has its own buffer.
Essentially, it replaces instances of
const char* mResult; // This is the "shared" string.
with
UTF8 mText[MAX_STRING_LENGTH + 1]; // Each instance has its own buffer.
in guiConsoleTextCtrl.h and makes appropriate changes in guiConsoleTextCtrl.cc to make it work (with a string copy of the evaluated results into the buffer).

Torque 3D Owner Arcanor