mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-03-03 10:11:51 -05:00
ImGui Switch/Wii U slider fixes (#1371)
* Switch/Wii U slider fixes * Attempt at better spacing * Updated after ImGui merge
This commit is contained in:
parent
18a26b480e
commit
e1f95a5ad9
@ -545,7 +545,11 @@ namespace GameMenuBar {
|
|||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
|
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||||
|
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
||||||
|
#else
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
||||||
|
#endif
|
||||||
if (ImGui::SliderInt("##ExtraLatencyThreshold", &val, 0, 360, "", ImGuiSliderFlags_AlwaysClamp))
|
if (ImGui::SliderInt("##ExtraLatencyThreshold", &val, 0, 360, "", ImGuiSliderFlags_AlwaysClamp))
|
||||||
{
|
{
|
||||||
CVar_SetS32(cvar, val);
|
CVar_SetS32(cvar, val);
|
||||||
@ -1069,8 +1073,8 @@ namespace GameMenuBar {
|
|||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
#ifdef __WIIU__
|
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f * 2);
|
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
||||||
#else
|
#else
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
||||||
#endif
|
#endif
|
||||||
|
@ -322,11 +322,11 @@ namespace UIWidgets {
|
|||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
}
|
}
|
||||||
if (PlusMinusButton) {
|
if (PlusMinusButton) {
|
||||||
#ifdef __WIIU__
|
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f * 2);
|
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
||||||
#else
|
#else
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (ImGui::SliderFloat(id, &val, min, max, format))
|
if (ImGui::SliderFloat(id, &val, min, max, format))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user