mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 03:12:18 -05:00
Fix Radiobutton uniqueness issues (#397)
* Fix Radiobox uniqueness issues * C++ ? and build fix I think * To match the edit made in .c
This commit is contained in:
parent
7913398110
commit
29d4cd27c4
@ -447,11 +447,17 @@ namespace SohImGui {
|
||||
EnhancementRadioButton("German", "gLanguages", 1);
|
||||
EnhancementRadioButton("French", "gLanguages", 2);
|
||||
*/
|
||||
std::string make_invisible = "##";
|
||||
make_invisible += text;
|
||||
make_invisible += cvarName;
|
||||
|
||||
int val = CVar_GetS32(cvarName, 0);
|
||||
if (ImGui::RadioButton(text, id == val)) {
|
||||
if (ImGui::RadioButton(make_invisible.c_str(), id == val)) {
|
||||
CVar_SetS32(cvarName, id);
|
||||
needs_save = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", text);
|
||||
}
|
||||
|
||||
void EnhancementCheckbox(const char* text, const char* cvarName)
|
||||
|
Loading…
Reference in New Issue
Block a user