--------------------------------------------------------------------------
| 223 | |
| 224 | //-------------------------------------------------------------------------- |
| 225 | bool 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 | //-------------------------------------------------------------------------- |
| 244 | void GuiMessageVectorCtrl::detach() |
no test coverage detected