| 782 | } |
| 783 | |
| 784 | bool AlienImGui::SelectableButton(SelectableButtonParameters const& parameters, bool& value) |
| 785 | { |
| 786 | auto buttonColor = ImColor(ImGui::GetStyle().Colors[ImGuiCol_Button]); |
| 787 | auto buttonColorHovered = ImColor(ImGui::GetStyle().Colors[ImGuiCol_ButtonHovered]); |
| 788 | auto buttonColorActive = ImColor(ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]); |
| 789 | if (value) { |
| 790 | buttonColor = buttonColorActive; |
| 791 | buttonColorHovered = buttonColorActive; |
| 792 | } |
| 793 | |
| 794 | ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)buttonColor); |
| 795 | ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)buttonColorHovered); |
| 796 | ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)buttonColorActive); |
| 797 | auto result = ImGui::Button(parameters._name.c_str(), {scale(parameters._width), 0}); |
| 798 | if (result) { |
| 799 | value = !value; |
| 800 | } |
| 801 | ImGui::PopStyleColor(3); |
| 802 | |
| 803 | return result; |
| 804 | } |
| 805 | |
| 806 | void AlienImGui::Text(std::string const& text) |
| 807 | { |