MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / inRadioButton

Function inRadioButton

ImGuiFileDialog.cpp:326–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324#endif // DisplayMode_ThumbailsList_ImageHeight
325#ifndef IMGUI_RADIO_BUTTON
326inline bool inRadioButton(const char* vLabel, bool vToggled) {
327 bool pressed = false;
328 if (vToggled) {
329 ImVec4 bua = ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive);
330 ImVec4 te = ImGui::GetStyleColorVec4(ImGuiCol_Text);
331 ImGui::PushStyleColor(ImGuiCol_Button, te);
332 ImGui::PushStyleColor(ImGuiCol_ButtonActive, te);
333 ImGui::PushStyleColor(ImGuiCol_ButtonHovered, te);
334 ImGui::PushStyleColor(ImGuiCol_Text, bua);
335 }
336 pressed = IMGUI_BUTTON(vLabel);
337 if (vToggled) {
338 ImGui::PopStyleColor(4); //-V112
339 }
340 return pressed;
341}
342#define IMGUI_RADIO_BUTTON inRadioButton
343#endif // IMGUI_RADIO_BUTTON
344#endif // USE_THUMBNAILS

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected