Skip to content

Commit

Permalink
Fixed enum | warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemony committed Feb 26, 2024
1 parent efd3456 commit 04aa4bc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
64 changes: 32 additions & 32 deletions include/utility/skif_imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@
#include <imgui/imgui.h>
#include <imgui/imgui_internal.h>

float SKIF_ImGui_LinearTosRGB (float col_lin);
ImVec4 SKIF_ImGui_LinearTosRGB (ImVec4 col);
float SKIF_ImGui_sRGBtoLinear (float col_srgb);
ImVec4 SKIF_ImGui_sRGBtoLinear (ImVec4 col);
void SKIF_ImGui_StyleColorsDark (ImGuiStyle* dst = nullptr);
void SKIF_ImGui_StyleColorsLight (ImGuiStyle* dst = nullptr);
void SKIF_ImGui_AdjustAppModeSize (HMONITOR monitor);
void SKIF_ImGui_InfoMessage (const std::string szTitle, const std::string szLabel);
bool SKIF_ImGui_IsFocused (void);
bool SKIF_ImGui_IsMouseHovered (void);
bool SKIF_ImGui_IsAnyInputDown (void);
void SKIF_ImGui_SetMouseCursorHand (void);
void SKIF_ImGui_SetHoverTip (const std::string_view& szText, bool ignoreDisabledTooltips = false);
void SKIF_ImGui_SetHoverText (const std::string_view& szText, bool overrideExistingText = false);
bool SKIF_ImGui_BeginChildFrame (ImGuiID id, const ImVec2& size, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags = ImGuiWindowFlags_None);
void SKIF_ImGui_BeginTabChildFrame (void);
bool SKIF_ImGui_IconButton (ImGuiID id, std::string icon, std::string label, const ImVec4& colIcon = ImGui::GetStyleColorVec4 (ImGuiCol_SKIF_TextCaption));
void SKIF_ImGui_OptImage (ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0));
void SKIF_ImGui_Columns (int columns_count, const char* id, bool border, bool resizeble = false);
void SKIF_ImGui_Spacing (float multiplier);
void SKIF_ImGui_Spacing (void);
bool SKIF_ImGui_Selectable (const char* label);
void SKIF_ImGui_ServiceMenu (void);
ImFont* SKIF_ImGui_LoadFont (const std::wstring& filename, float point_size, const ImWchar* glyph_range, ImFontConfig* cfg = nullptr);
void SKIF_ImGui_InitFonts (float fontSize, bool extendedCharsets = true);
void SKIF_ImGui_SetStyle (ImGuiStyle* dst = nullptr);
void SKIF_ImGui_PushDisableState (void);
void SKIF_ImGui_PopDisableState (void);
void SKIF_ImGui_DisallowMouseDragMove (void); // Prevents SKIF from enabling drag move using the mouse
bool SKIF_ImGui_CanMouseDragMove (void); // True if drag move using the mouse is allowed, false if not
void SKIF_ImGui_InvalidateFonts (void);
ImGuiKey SKIF_ImGui_CharToImGuiKey (char c);
float SKIF_ImGui_LinearTosRGB (float col_lin);
ImVec4 SKIF_ImGui_LinearTosRGB (ImVec4 col);
float SKIF_ImGui_sRGBtoLinear (float col_srgb);
ImVec4 SKIF_ImGui_sRGBtoLinear (ImVec4 col);
void SKIF_ImGui_StyleColorsDark (ImGuiStyle* dst = nullptr);
void SKIF_ImGui_StyleColorsLight (ImGuiStyle* dst = nullptr);
void SKIF_ImGui_AdjustAppModeSize (HMONITOR monitor);
void SKIF_ImGui_InfoMessage (const std::string szTitle, const std::string szLabel);
bool SKIF_ImGui_IsFocused (void);
bool SKIF_ImGui_IsMouseHovered (void);
bool SKIF_ImGui_IsAnyInputDown (void);
void SKIF_ImGui_SetMouseCursorHand (void);
void SKIF_ImGui_SetHoverTip (const std::string_view& szText, bool ignoreDisabledTooltips = false);
void SKIF_ImGui_SetHoverText (const std::string_view& szText, bool overrideExistingText = false);
bool SKIF_ImGui_BeginChildFrame (ImGuiID id, const ImVec2& size, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags = ImGuiWindowFlags_None);
void SKIF_ImGui_BeginTabChildFrame (void);
bool SKIF_ImGui_IconButton (ImGuiID id, std::string icon, std::string label, const ImVec4& colIcon = ImGui::GetStyleColorVec4 (ImGuiCol_SKIF_TextCaption));
void SKIF_ImGui_OptImage (ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0));
void SKIF_ImGui_Columns (int columns_count, const char* id, bool border, bool resizeble = false);
void SKIF_ImGui_Spacing (float multiplier);
void SKIF_ImGui_Spacing (void);
bool SKIF_ImGui_Selectable (const char* label);
void SKIF_ImGui_ServiceMenu (void);
ImFont* SKIF_ImGui_LoadFont (const std::wstring& filename, float point_size, const ImWchar* glyph_range, ImFontConfig* cfg = nullptr);
void SKIF_ImGui_InitFonts (float fontSize, bool extendedCharsets = true);
void SKIF_ImGui_SetStyle (ImGuiStyle* dst = nullptr);
void SKIF_ImGui_PushDisableState (void);
void SKIF_ImGui_PopDisableState (void);
void SKIF_ImGui_DisallowMouseDragMove (void); // Prevents SKIF from enabling drag move using the mouse
bool SKIF_ImGui_CanMouseDragMove (void); // True if drag move using the mouse is allowed, false if not
void SKIF_ImGui_InvalidateFonts (void);
ImGuiKey SKIF_ImGui_CharToImGuiKey (char c);

// SKIF_ImGui_ImDerp, named as such as it is not a linear interpolation/lerp, is used
// to among other things force 1.0f for the alpha color channel (w)
Expand Down
6 changes: 3 additions & 3 deletions src/SKIF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2956,7 +2956,7 @@ wWinMain ( _In_ HINSTANCE hInstance,
std::min<float>(
std::min<float>(_updater.GetResults().history_formatted.lines, 40.0f) * fontConsolas->FontSize,
SKIF_vecCurrentMode.y * 0.5f)
), ImGuiInputTextFlags_Multiline | ImGuiInputTextFlags_ReadOnly);
), ImGuiInputTextFlags_ReadOnly | static_cast<ImGuiInputTextFlags_>(ImGuiInputTextFlags_Multiline));

SKIF_ImGui_DisallowMouseDragMove ( );

Expand Down Expand Up @@ -3124,7 +3124,7 @@ wWinMain ( _In_ HINSTANCE hInstance,
std::min<float> (
std::min<float>(_updater.GetResults().history_formatted.lines, 40.0f) * fontConsolas->FontSize,
SKIF_vecCurrentMode.y * 0.6f)
), ImGuiInputTextFlags_Multiline | ImGuiInputTextFlags_ReadOnly);
), ImGuiInputTextFlags_ReadOnly | static_cast<ImGuiInputTextFlags_>(ImGuiInputTextFlags_Multiline));

SKIF_ImGui_DisallowMouseDragMove ( );

Expand Down Expand Up @@ -3227,7 +3227,7 @@ wWinMain ( _In_ HINSTANCE hInstance,
std::min<float> (
std::min<float>(_updater.GetAutoUpdateNotes().lines, 40.0f) * fontConsolas->FontSize,
SKIF_vecCurrentMode.y * 0.6f)
), ImGuiInputTextFlags_Multiline | ImGuiInputTextFlags_ReadOnly);
), ImGuiInputTextFlags_ReadOnly | static_cast<ImGuiInputTextFlags_>(ImGuiInputTextFlags_Multiline));

SKIF_ImGui_DisallowMouseDragMove ( );

Expand Down
6 changes: 3 additions & 3 deletions src/utility/skif_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,8 +1226,8 @@ SKIF_ImGui_InvalidateFonts (void)
ImGui_ImplDX11_InvalidateDeviceObjects ( );
}


// Map char to ImGuiKey_xxx.
// This helper function maps char to ImGuiKey_xxx
// For use with e.g. ImGui::GetKeyData ( )
ImGuiKey
SKIF_ImGui_CharToImGuiKey (char c)
{
Expand Down Expand Up @@ -1279,4 +1279,4 @@ SKIF_ImGui_CharToImGuiKey (char c)
case 'Z': return ImGuiKey_Z;
default: return ImGuiKey_None;
}
}
}

0 comments on commit 04aa4bc

Please sign in to comment.