Set `header()` and `OptionArrowButtons()` alpha to 1.0f (#1096)
* Set `header()` alpha to 1.0f * Do not grey out `OptionArrowButtons()` also
This commit is contained in:
parent
3330f01267
commit
6c249ee4d2
|
@ -650,10 +650,12 @@ static void gui_display_commands()
|
|||
inline static void header(const char *title)
|
||||
{
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.f, 0.5f)); // Left
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_DisabledAlpha, 1.0f);
|
||||
ImGui::BeginDisabled();
|
||||
ImGui::ButtonEx(title, ImVec2(-1, 0));
|
||||
ImGui::EndDisabled();
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleVar();
|
||||
}
|
||||
|
||||
const char *maple_device_types[] =
|
||||
|
|
|
@ -521,9 +521,11 @@ bool OptionArrowButtons(const char *name, config::Option<int>& option, int min,
|
|||
ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_FrameBg]);
|
||||
float width = ImGui::CalcItemWidth() - innerSpacing * 2.0f - ImGui::GetFrameHeight() * 2.0f;
|
||||
std::string id = "##" + std::string(name);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_DisabledAlpha, 1.0f);
|
||||
ImGui::BeginDisabled();
|
||||
ImGui::ButtonEx((std::to_string((int)option) + id).c_str(), ImVec2(width, 0));
|
||||
ImGui::EndDisabled();
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
|
|
Loading…
Reference in New Issue