MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / configSystem

Function configSystem

TheForceEngine/TFE_FrontEndUI/frontEndUi.cpp:3486–3564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3484 }
3485
3486 void configSystem()
3487 {
3488 ImGui::LabelText("##ConfigLabel", "System Settings");
3489 TFE_Settings_System* system = TFE_Settings::getSystemSettings();
3490 bool gameQuitExitsToMenu = system->gameQuitExitsToMenu;
3491 bool returnToModLoader = system->returnToModLoader;
3492 if (ImGui::Checkbox("Game Exit Returns to TFE Menu", &gameQuitExitsToMenu))
3493 {
3494 system->gameQuitExitsToMenu = gameQuitExitsToMenu;
3495 }
3496 if (ImGui::Checkbox("Returns to Mod Loader when a mod is loaded", &returnToModLoader))
3497 {
3498 system->returnToModLoader = returnToModLoader;
3499 }
3500
3501 f32 labelW = 140 * s_uiScale;
3502 f32 valueW = 260 * s_uiScale - 10;
3503 s32 framerate = (s32)system->gifRecordingFramerate;
3504 DrawLabelledIntSlider(labelW, valueW - 2, "GIF Record Framerate", "##CBO", &framerate, 10, 30);
3505 Tooltip("Number of frames per second to capture when recording a GIF.");
3506 system->gifRecordingFramerate = (f32)framerate;
3507
3508 bool showGifPathConfirmation = system->showGifPathConfirmation;
3509 if (ImGui::Checkbox("Show file path when recording ends", &showGifPathConfirmation))
3510 {
3511 system->showGifPathConfirmation = showGifPathConfirmation;
3512 }
3513 Tooltip("Appears in upper-left corner of screen. If disabled, a generic 'recording saved' message will be shown instead.");
3514
3515 #ifdef _WIN32
3516 ImGui::Separator();
3517 if (ImGui::Button("Open Log Folder"))
3518 {
3519 char logDir[TFE_MAX_PATH];
3520 TFE_Paths::appendPath(TFE_PathType::PATH_USER_DOCUMENTS, "", logDir);
3521 if (!TFE_System::osShellExecute(logDir, NULL, NULL, false))
3522 {
3523 TFE_System::logWrite(LOG_ERROR, "Settings", "Failed to open directory: '%s'", logDir);
3524 }
3525 }
3526 if (ImGui::Button("Open Screenshots Folder"))
3527 {
3528 char screenshotDir[TFE_MAX_PATH];
3529 TFE_Paths::appendPath(TFE_PathType::PATH_USER_DOCUMENTS, "Screenshots/", screenshotDir);
3530 if (!TFE_System::osShellExecute(screenshotDir, NULL, NULL, false))
3531 {
3532 TFE_System::logWrite(LOG_ERROR, "Settings", "Failed to open directory: '%s'", screenshotDir);
3533 }
3534 }
3535 #endif
3536 const char * resetMsg = " Reset All Settings";
3537
3538 if (ImGui::Button("Reset All Settings"))
3539 {
3540 ImGui::OpenPopup(resetMsg);
3541 }
3542
3543

Callers 1

drawFunction · 0.85

Calls 9

getSystemSettingsFunction · 0.85
DrawLabelledIntSliderFunction · 0.85
TooltipFunction · 0.85
ButtonEnum · 0.85
logWriteFunction · 0.85
ImVec2Function · 0.85
resetAllSettingsFunction · 0.85
appendPathFunction · 0.50
osShellExecuteFunction · 0.50

Tested by

no test coverage detected