Item Tracker Combo Button Fix (#3231)

* let words be small

* change >=1 to >0
This commit is contained in:
inspectredc 2023-10-02 15:34:37 +01:00 committed by GitHub
parent 82d87ff680
commit b1f0c964d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,7 +240,7 @@ namespace UIWidgets {
std::string comboName = std::string("##") + std::string(cvarName); std::string comboName = std::string("##") + std::string(cvarName);
if (ImGui::BeginCombo(comboName.c_str(), comboArray[selected])) { if (ImGui::BeginCombo(comboName.c_str(), comboArray[selected])) {
for (uint8_t i = 0; i < comboArray.size(); i++) { for (uint8_t i = 0; i < comboArray.size(); i++) {
if (strlen(comboArray[i]) > 1) { if (strlen(comboArray[i]) > 0) {
if (ImGui::Selectable(comboArray[i], i == selected)) { if (ImGui::Selectable(comboArray[i], i == selected)) {
CVarSetInteger(cvarName, i); CVarSetInteger(cvarName, i);
selected = i; selected = i;