Create button with specific name*/
| 67 | |
| 68 | /** Create button with specific name*/ |
| 69 | MessageBoxStyle addButtonName(const UString& _name) |
| 70 | { |
| 71 | if (mVectorButton.size() >= MessageBoxStyle::_countUserButtons) |
| 72 | { |
| 73 | MYGUI_LOG(Warning, "Too many buttons in message box, ignored"); |
| 74 | return MessageBoxStyle::None; |
| 75 | } |
| 76 | // бит, номер кнопки + смещение до Button1 |
| 77 | MessageBoxStyle info = MessageBoxStyle( |
| 78 | MessageBoxStyle::Enum(MYGUI_FLAG(mVectorButton.size() + MessageBoxStyle::_indexUserButton1))); |
| 79 | |
| 80 | // запоминаем кнопки для отмены и подтверждения |
| 81 | if (mVectorButton.empty()) |
| 82 | mInfoOk = info; |
| 83 | mInfoCancel = info; |
| 84 | |
| 85 | Widget* widget = |
| 86 | mMainWidget->createWidgetT(mButtonType, mButtonSkin, IntCoord(), Align::Left | Align::Bottom); |
| 87 | Button* button = widget->castType<Button>(); |
| 88 | button->eventMouseButtonClick += newDelegate(this, &Message::notifyButtonClick); |
| 89 | button->setCaption(_name); |
| 90 | button->_setInternalData(info); |
| 91 | mVectorButton.push_back(button); |
| 92 | |
| 93 | updateSize(); |
| 94 | return info; |
| 95 | } |
| 96 | |
| 97 | /** Set smooth message showing*/ |
| 98 | void setSmoothShow(bool _value) |
no test coverage detected