------------------------------------------------------------------------------
| 66 | |
| 67 | //------------------------------------------------------------------------------ |
| 68 | void GuiBubbleTextCtrl::onMouseDown(const GuiEvent &event) |
| 69 | { |
| 70 | if (mInAction) |
| 71 | { |
| 72 | popBubble(); |
| 73 | |
| 74 | return; |
| 75 | } |
| 76 | |
| 77 | mDlg = new GuiControl(); |
| 78 | AssertFatal(mDlg, "Failed to create the GuiControl for the BubbleTextCtrl"); |
| 79 | mDlg->setDataField( StringTable->insert("profile"), NULL, "GuiModelessDialogProfile"); |
| 80 | mDlg->setField("horizSizing", "width"); |
| 81 | mDlg->setField("vertSizing", "height"); |
| 82 | mDlg->setField("extent", "640 480"); |
| 83 | |
| 84 | mPopup = new GuiControl(); |
| 85 | AssertFatal(mPopup, "Failed to create the GuiControl for the BubbleTextCtrl"); |
| 86 | mPopup->setDataField( StringTable->insert("profile"), NULL, "GuiBubblePopupProfile"); |
| 87 | |
| 88 | mMLText = new GuiMLTextCtrl(); |
| 89 | AssertFatal(mMLText, "Failed to create the GuiMLTextCtrl for the BubbleTextCtrl"); |
| 90 | mMLText->setDataField( StringTable->insert("profile"), NULL, "GuiBubbleTextProfile"); |
| 91 | mMLText->setField("position", "2 2"); |
| 92 | mMLText->setField("extent", "296 51"); |
| 93 | |
| 94 | mMLText->setText((char*)mText,dStrlen(mText)); |
| 95 | |
| 96 | mMLText->registerObject(); |
| 97 | mPopup->registerObject(); |
| 98 | mDlg->registerObject(); |
| 99 | |
| 100 | mPopup->addObject(mMLText); |
| 101 | mDlg->addObject(mPopup); |
| 102 | |
| 103 | mPopup->resize(event.mousePoint,Point2I(300,55)); |
| 104 | |
| 105 | getRoot()->pushDialogControl(mDlg,0); |
| 106 | mouseLock(); |
| 107 | |
| 108 | mInAction = true; |
| 109 | } |
nothing calls this directly
no test coverage detected