Formatted the entire codebase and added a CI check for formatting

This commit is contained in:
AlexandreRouma
2021-12-19 22:11:44 +01:00
parent 8644957881
commit ea587db0cb
161 changed files with 3302 additions and 3393 deletions

View File

@@ -51,7 +51,7 @@ namespace module_manager_menu {
ImGui::TableSetColumnIndex(2);
ImVec2 origPos = ImGui::GetCursorPos();
ImGui::SetCursorPos(ImVec2(origPos.x - 3, origPos.y));
if (ImGui::Button(("##module_mgr_"+name).c_str(), ImVec2(height,height))) {
if (ImGui::Button(("##module_mgr_" + name).c_str(), ImVec2(height, height))) {
toBeRemoved = name;
confirmOpened = true;
}
@@ -61,14 +61,14 @@ namespace module_manager_menu {
ImGui::EndTable();
}
if (ImGui::GenericDialog("module_mgr_confirm_", confirmOpened, GENERIC_DIALOG_BUTTONS_YES_NO, [](){
ImGui::Text("Deleting \"%s\". Are you sure?", toBeRemoved.c_str());
}) == GENERIC_DIALOG_BUTTON_YES) {
if (ImGui::GenericDialog("module_mgr_confirm_", confirmOpened, GENERIC_DIALOG_BUTTONS_YES_NO, []() {
ImGui::Text("Deleting \"%s\". Are you sure?", toBeRemoved.c_str());
}) == GENERIC_DIALOG_BUTTON_YES) {
core::moduleManager.deleteInstance(toBeRemoved);
modified = true;
}
ImGui::GenericDialog("module_mgr_error_", errorOpen, GENERIC_DIALOG_BUTTONS_OK, [](){
ImGui::GenericDialog("module_mgr_error_", errorOpen, GENERIC_DIALOG_BUTTONS_OK, []() {
ImGui::Text(errorMessage.c_str());
});
@@ -89,7 +89,7 @@ namespace module_manager_menu {
ImGui::TableSetColumnIndex(2);
if (strlen(modName) == 0) { style::beginDisabled(); }
if (ImGui::Button("+##module_mgr_add_btn", ImVec2(16,0))) {
if (ImGui::Button("+##module_mgr_add_btn", ImVec2(16, 0))) {
if (!core::moduleManager.createInstance(modName, modTypes[modTypeId])) {
core::moduleManager.postInit(modName);
modified = true;