MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / attach

Method attach

Engine/source/gui/game/guiMessageVectorCtrl.cpp:225–241  ·  view source on GitHub ↗

--------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

223
224//--------------------------------------------------------------------------
225bool GuiMessageVectorCtrl::attach(MessageVector* newAttachment)
226{
227 AssertFatal(newAttachment, "No attachment!");
228 if (newAttachment == NULL || !isAwake())
229 return false;
230
231 if (isAttached()) {
232 Con::warnf(ConsoleLogEntry::General, "GuiMessageVectorCtrl::attach: overriding attachment");
233 detach();
234 }
235 AssertFatal(mLineWrappings.size() == 0, "Error, line wrappings not properly cleared!");
236
237 mMessageVector = newAttachment;
238 mMessageVector->registerSpectator(sMVCtrlCallback, this);
239
240 return true;
241}
242
243//--------------------------------------------------------------------------
244void GuiMessageVectorCtrl::detach()

Callers 1

Calls 4

registerSpectatorMethod · 0.80
isAwakeFunction · 0.50
warnfFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected