2022-05-04 19:16:40 +02:00
|
|
|
#include "views/view.hpp"
|
2022-12-09 20:43:01 +01:00
|
|
|
#include "renderer.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void view::gui_settings()
|
|
|
|
{
|
2022-12-09 20:43:01 +01:00
|
|
|
components::sub_title("UI Scale");
|
2022-12-18 23:15:52 +01:00
|
|
|
ImGui::SliderFloat("##gui-scale", &g.window.gui_scale, 1.f, 1.5f, "%.2f");
|
2022-12-09 20:43:01 +01:00
|
|
|
ImGui::SameLine();
|
|
|
|
if (ImGui::Button("Apply##gui-scale"))
|
2022-12-18 23:15:52 +01:00
|
|
|
g_renderer->rescale(g.window.gui_scale);
|
2022-12-09 20:43:01 +01:00
|
|
|
if (ImGui::IsItemHovered())
|
|
|
|
ImGui::SetTooltip("Changing the UI scale may break rendering and require you to unload and inject YimMenu again.");
|
|
|
|
|
|
|
|
components::sub_title("Colors");
|
2022-12-18 23:15:52 +01:00
|
|
|
static ImVec4 col_gui = ImGui::ColorConvertU32ToFloat4(g.window.color);
|
2022-05-04 19:16:40 +02:00
|
|
|
if (ImGui::ColorEdit4("Gui Color##gui_picker", (float*)&col_gui, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.window.color = ImGui::ColorConvertFloat4ToU32(col_gui);
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|