impr: Add warning about using fractional scaling with default font

This commit is contained in:
WerWolv
2024-05-18 20:32:57 +02:00
parent 125d6a3e2a
commit f0e135530a
5 changed files with 13 additions and 10 deletions

View File

@@ -131,7 +131,7 @@ namespace ImGuiExt {
bool DescriptionButton(const char *label, const char *description, const ImVec2 &size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
bool DescriptionButtonProgress(const char *label, const char *description, float fraction, const ImVec2 &size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
void HelpHover(const char *text);
void HelpHover(const char *text, const char *icon = "(?)", ImU32 iconColor = ImGui::GetColorU32(ImGuiCol_ButtonActive));
void UnderlinedText(const char *label, ImColor color = ImGui::GetStyleColorVec4(ImGuiCol_Text), const ImVec2 &size_arg = ImVec2(0, 0));

View File

@@ -503,9 +503,7 @@ namespace ImGuiExt {
return pressed;
}
void HelpHover(const char *text) {
const auto iconColor = GetStyleColorVec4(ImGuiCol_ButtonActive);
void HelpHover(const char *text, const char *icon, ImU32 iconColor) {
PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0, 0, 0, 0));
PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0, 0, 0, 0));
@@ -513,7 +511,7 @@ namespace ImGuiExt {
PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0F);
PushStyleColor(ImGuiCol_Text, iconColor);
Button("(?)");
Button(icon);
PopStyleColor();
if (IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) {