mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Now "closewindow" attribute works for <button> widget when it isn't inside a window.
This commit is contained in:
parent
9e252f992f
commit
5bbf0140cd
@ -151,11 +151,9 @@ static Widget* convert_xmlelement_to_widget(TiXmlElement* elem, Widget* root)
|
|||||||
setup_bevels(widget, b[0], b[1], b[2], b[3]);
|
setup_bevels(widget, b[0], b[1], b[2], b[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (closewindow && root) {
|
if (closewindow) {
|
||||||
if (Frame* frame = dynamic_cast<Frame*>(root)) {
|
static_cast<Button*>(widget)
|
||||||
static_cast<Button*>(widget)->
|
->Click.connect(Bind<void>(&Widget::closeWindow, widget));
|
||||||
Click.connect(Bind<void>(&Frame::closeWindow, frame, widget));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user