28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
|
#include <imgui.h>
|
||
|
#include <imgui_stdlib.h>
|
||
|
|
||
|
#include "../config.h"
|
||
|
#include "settings.h"
|
||
|
|
||
|
void settings_window(Config& config, float* config_write_timer, bool* p_open) {
|
||
|
if (!ImGui::Begin("Settings", p_open)) {
|
||
|
ImGui::End();
|
||
|
return;
|
||
|
}
|
||
|
// TODO actually have process control
|
||
|
ImGui::Text("Logcat command only takes effect when logcat is not running");
|
||
|
if (ImGui::InputTextWithHint("Logcat command", "adb logcat -Dv 'threadtime UTC epoch usec uid'", &config.logcat_command)) {
|
||
|
*config_write_timer = *config_write_timer > 0.0f ? *config_write_timer : 5.0f;
|
||
|
}
|
||
|
ImGui::Text("Font sizes only take effect when LogMeow is restarted");
|
||
|
#ifdef USE_FONTCONFIG
|
||
|
if (ImGui::InputFloat("Normal font size", &config.normal_font_size, 0.5f, 1.0f, "%.3f")) {
|
||
|
*config_write_timer = *config_write_timer > 0.0f ? *config_write_timer : 5.0f;
|
||
|
}
|
||
|
#endif
|
||
|
if (ImGui::InputFloat("Monospace font size", &config.monospace_font_size, 0.5f, 1.0f, "%.3f")) {
|
||
|
*config_write_timer = *config_write_timer > 0.0f ? *config_write_timer : 5.0f;
|
||
|
}
|
||
|
ImGui::End();
|
||
|
}
|