fix export ppbr panel
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<border id="background" positioning="absolute" position="0 0" color=".4 .4 .4 .8" width="100%" height="100%" align="center" justify="center" mouse-capture="true">
|
||||
<border id="form" thickness="1" border-color=".2" pad="3" width="650" dir="col">
|
||||
<border id="title" width="100%" height="30" color=".2 .2 .2 .9" dir="row" align="center" justify="center">
|
||||
<text text="Save Brushes"></text>
|
||||
<text text="Export Brushes"></text>
|
||||
</border>
|
||||
<border width="100%" color="0 0 0 .9" pad="10" dir="row" grow="1">
|
||||
<border id="files-list" dir="row" wrap="1" flood-events="1" grow="1" height="100%" margin="0 0 0 0" pad="10" color=".2 .2 .2 1">
|
||||
@@ -81,7 +81,7 @@
|
||||
</border>
|
||||
</border>
|
||||
<node id="footer" height="50" dir="row" align="flex-end" justify="flex-end" pad="10">
|
||||
<button id="btn-ok" text="Share" width="100" height="30" margin="0 10 0 0"/>
|
||||
<button id="btn-ok" text="Export" width="100" height="30" margin="0 10 0 0"/>
|
||||
<button id="btn-cancel" text="Cancel" width="60" height="30"/>
|
||||
</node>
|
||||
</border>
|
||||
|
||||
@@ -201,7 +201,7 @@ void App::pick_file_save(const std::string& type, std::function<void(std::string
|
||||
auto mb = input_box("Insert", "File name");
|
||||
std::string placeholder = "name." + type;
|
||||
mb->m_field_text->set_text(placeholder.c_str());
|
||||
mb->on_submit = [this, writer, type, callback] (Node* target, std::string name) {
|
||||
mb->on_submit = [this, writer, type, callback, mb] (Node* target, std::string name) {
|
||||
std::string ext = "." + type;
|
||||
std::string path = data_path + "/" + name;
|
||||
if (name.find(ext) == std::string::npos)
|
||||
@@ -211,13 +211,13 @@ void App::pick_file_save(const std::string& type, std::function<void(std::string
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[ios_view pick_file_save:path];
|
||||
});
|
||||
target->destroy();
|
||||
mb->destroy();
|
||||
callback(true);
|
||||
}).detach();
|
||||
};
|
||||
mb->btn_cancel->on_click = [=] (Node* target) {
|
||||
callback(false);
|
||||
target->destroy();
|
||||
mb->destroy();
|
||||
};
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user