mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-03 14:40:02 +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]);
|
||||
}
|
||||
|
||||
if (closewindow && root) {
|
||||
if (Frame* frame = dynamic_cast<Frame*>(root)) {
|
||||
static_cast<Button*>(widget)->
|
||||
Click.connect(Bind<void>(&Frame::closeWindow, frame, widget));
|
||||
}
|
||||
if (closewindow) {
|
||||
static_cast<Button*>(widget)
|
||||
->Click.connect(Bind<void>(&Widget::closeWindow, widget));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user