Dialog::Dialog(std::string id, std::string message) : _id(id) { LinearContainer * buttons = new LinearContainer(); buttons->setHorizontal(); buttonOk = new ButtonWidget(new TextWidget("Ok", 0, 0)); buttons->addWidget(buttonOk); setLayout(setTextMessage(message), buttons); _ct = -getWidth(); }
Dialog::Dialog(std::string id, std::string message, std::string positiveButton, std::string negativeButton, std::string neutralButton) : _id(id) { LinearContainer * buttons = new LinearContainer(); buttons->setHorizontal(); buttonPositive = new ButtonWidget(new TextWidget(positiveButton, 0, 0)); buttons->addWidget(buttonPositive); buttonNegative = new ButtonWidget(new TextWidget(negativeButton, 0, 0)); buttons->addWidget(buttonNegative); buttonNeutral = new ButtonWidget(new TextWidget(neutralButton, 0, 0)); buttons->addWidget(buttonNeutral); setLayout(setTextMessage(message), buttons); _ct = -getWidth(); }