mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-08 10:03:06 -04:00
fix conflicts
This commit is contained in:
@@ -73,28 +73,6 @@ bool Modal::focus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Modal::add_action(ModalAction action) {
|
||||
auto actions = mDialog->QuerySelector(".modal-actions");
|
||||
auto btn = std::make_unique<Button>(actions, action.label);
|
||||
btn->root()->SetClass("modal-btn", true);
|
||||
btn->on_pressed([this, callback = std::move(action.onPressed)] {
|
||||
if (callback) {
|
||||
callback(*this);
|
||||
}
|
||||
});
|
||||
mButtons.push_back(std::move(btn));
|
||||
}
|
||||
|
||||
void Modal::set_body(const Rml::String& bodyRml) {
|
||||
auto body = mDialog->QuerySelector(".modal-body");
|
||||
body->SetInnerRML(bodyRml);
|
||||
}
|
||||
|
||||
void Modal::set_icon(const Rml::String& iconStr) {
|
||||
auto icon = mDialog->QuerySelector("icon");
|
||||
icon->SetClassNames({iconStr});
|
||||
}
|
||||
|
||||
void Modal::dismiss() {
|
||||
if (mProps.onDismiss) {
|
||||
mProps.onDismiss(*this);
|
||||
|
||||
Reference in New Issue
Block a user