App::I static singleton to pointer

This commit is contained in:
2019-07-11 18:08:17 +02:00
parent 92dd00d910
commit b89274e7a6
33 changed files with 417 additions and 412 deletions

View File

@@ -87,7 +87,7 @@ void App::dialog_newdoc()
layout[main_id]->add_child(dialog);
layout[main_id]->update();
App::I.showKeyboard();
App::I->showKeyboard();
dialog->btn_ok->on_click = [this, dialog](Node*)
{
@@ -121,7 +121,7 @@ void App::dialog_newdoc()
title_update();
dialog->destroy();
App::I.hideKeyboard();
App::I->hideKeyboard();
};
if (Asset::exist(path))
@@ -147,7 +147,7 @@ void App::dialog_newdoc()
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I.hideKeyboard();
App::I->hideKeyboard();
};
};
@@ -355,7 +355,7 @@ void App::dialog_save()
dialog->loaded();
dialog->input->set_text(doc_name);
App::I.showKeyboard();
App::I->showKeyboard();
dialog->btn_ok->on_click = [this, dialog](Node*)
{
@@ -375,7 +375,7 @@ void App::dialog_save()
doc_dir = work_path;
title_update();
dialog->destroy();
App::I.hideKeyboard();
App::I->hideKeyboard();
};
if (Asset::exist(path))
@@ -400,7 +400,7 @@ void App::dialog_save()
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I.hideKeyboard();
App::I->hideKeyboard();
};
layout[main_id]->add_child(dialog);
@@ -496,7 +496,7 @@ void App::dialog_resize()
int res = dialog->get_resolution();
if (canvas)
canvas->m_canvas->resize(res, res);
App::I.title_update();
App::I->title_update();
ActionManager::clear();
dialog->destroy();
};
@@ -519,7 +519,7 @@ void App::dialog_layer_rename()
dialog->loaded();
dialog->input->set_text(layers->m_current_layer->m_label_text);
App::I.showKeyboard();
App::I->showKeyboard();
layout[main_id]->add_child(dialog);
layout[main_id]->update();
@@ -553,11 +553,11 @@ void App::dialog_layer_rename()
layer_node->set_name(dialog->get_name().c_str());
layer->m_name = dialog->get_name();
dialog->destroy();
App::I.hideKeyboard();
App::I->hideKeyboard();
};
dialog->btn_cancel->on_click = [this, dialog](Node*)
{
dialog->destroy();
App::I.hideKeyboard();
App::I->hideKeyboard();
};
}