Configuration/Application: disable armoury.
This commit is contained in:
parent
40f2d88433
commit
205c502c54
3 changed files with 38 additions and 38 deletions
|
@ -335,17 +335,17 @@ Application::drawCustomStyle(GameObjects::CustomStyle& style) {
|
|||
style.name = name_buf.data();
|
||||
}
|
||||
|
||||
if(ImGui::SmallButton(ICON_FA_FILE_EXPORT " Export")) {
|
||||
if(!ImportExport::exportStyle(_currentMass->name(), style)) {
|
||||
_queue.addToast(Toast::Type::Error, ImportExport::lastExportError());
|
||||
}
|
||||
else {
|
||||
_queue.addToast(Toast::Type::Success, "Style exported successfully.");
|
||||
}
|
||||
}
|
||||
if(drawUnsafeWidget(ImGui::SmallButton, ICON_FA_FILE_IMPORT " Import")) {
|
||||
// TODO: implement once the style manager is ready.
|
||||
}
|
||||
//if(ImGui::SmallButton(ICON_FA_FILE_EXPORT " Export")) {
|
||||
// if(!ImportExport::exportStyle(_currentMass->name(), style)) {
|
||||
// _queue.addToast(Toast::Type::Error, ImportExport::lastExportError());
|
||||
// }
|
||||
// else {
|
||||
// _queue.addToast(Toast::Type::Success, "Style exported successfully.");
|
||||
// }
|
||||
//}
|
||||
//if(drawUnsafeWidget(ImGui::SmallButton, ICON_FA_FILE_IMPORT " Import")) {
|
||||
// // TODO: implement once the style manager is ready.
|
||||
//}
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ Application::drawMainMenu() {
|
|||
openUri(Utility::Path::toNativeSeparators(conf().directories().staging));
|
||||
}
|
||||
|
||||
if(ImGui::BeginMenu(ICON_FA_BOXES " Armoury")) {
|
||||
/*if(ImGui::BeginMenu(ICON_FA_BOXES " Armoury")) {
|
||||
if(ImGui::MenuItem(ICON_FA_SHIELD_ALT " Armour parts", nullptr, false,
|
||||
Utility::Path::exists(conf().directories().armours)))
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ Application::drawMainMenu() {
|
|||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}*/
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
|
|
@ -119,10 +119,10 @@ Configuration::Configuration() {
|
|||
Containers::String executable_location = Utility::Path::split(*Utility::Path::executableLocation()).first();
|
||||
_directories.backups = Utility::Path::join(executable_location, "backups");
|
||||
_directories.staging = Utility::Path::join(executable_location, "staging");
|
||||
auto armoury_dir = Utility::Path::join(executable_location, "armoury");
|
||||
_directories.armours = Utility::Path::join(armoury_dir, "armours");
|
||||
_directories.weapons = Utility::Path::join(armoury_dir, "weapons");
|
||||
_directories.styles = Utility::Path::join(armoury_dir, "styles");
|
||||
//auto armoury_dir = Utility::Path::join(executable_location, "armoury");
|
||||
//_directories.armours = Utility::Path::join(armoury_dir, "armours");
|
||||
//_directories.weapons = Utility::Path::join(armoury_dir, "weapons");
|
||||
//_directories.styles = Utility::Path::join(armoury_dir, "styles");
|
||||
_directories.temp = Utility::Path::join(executable_location, "temp");
|
||||
|
||||
if(!Utility::Path::exists(_directories.backups)) {
|
||||
|
@ -139,27 +139,27 @@ Configuration::Configuration() {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if(!Utility::Path::exists(_directories.armours)) {
|
||||
LOG_WARNING("Armours directory not found, creating...");
|
||||
if(!Utility::Path::make(_directories.armours)) {
|
||||
LOG_ERROR(_lastError = "Couldn't create the armours directory.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!Utility::Path::exists(_directories.weapons)) {
|
||||
LOG_WARNING("Weapons directory not found, creating...");
|
||||
if(!Utility::Path::make(_directories.weapons)) {
|
||||
LOG_ERROR(_lastError = "Couldn't create the weapons directory.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!Utility::Path::exists(_directories.styles)) {
|
||||
LOG_WARNING("Styles directory not found, creating...");
|
||||
if(!Utility::Path::make(_directories.styles)) {
|
||||
LOG_ERROR(_lastError = "Couldn't create the styles directory.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//if(!Utility::Path::exists(_directories.armours)) {
|
||||
// LOG_WARNING("Armours directory not found, creating...");
|
||||
// if(!Utility::Path::make(_directories.armours)) {
|
||||
// LOG_ERROR(_lastError = "Couldn't create the armours directory.");
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
//if(!Utility::Path::exists(_directories.weapons)) {
|
||||
// LOG_WARNING("Weapons directory not found, creating...");
|
||||
// if(!Utility::Path::make(_directories.weapons)) {
|
||||
// LOG_ERROR(_lastError = "Couldn't create the weapons directory.");
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
//if(!Utility::Path::exists(_directories.styles)) {
|
||||
// LOG_WARNING("Styles directory not found, creating...");
|
||||
// if(!Utility::Path::make(_directories.styles)) {
|
||||
// LOG_ERROR(_lastError = "Couldn't create the styles directory.");
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
if(!Utility::Path::exists(_directories.temp)) {
|
||||
LOG_WARNING("Temporary directory not found, creating...");
|
||||
|
|
Loading…
Reference in a new issue