quick fix for enums

This commit is contained in:
LIghty 2018-03-19 20:32:04 +01:00
parent 3faa9de0d6
commit a4380c0982
3 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ public:
const std::string defaults{ "0" }; const std::string defaults{ "0" };
const std::string desc_short{ "" }; const std::string desc_short{ "" };
const std::string desc_long{ "" }; const std::string desc_long{ "" };
const CatEnum *const enum_type{ nullptr }; CatEnum *enum_type{ nullptr };
std::string current_base{ "0" }; std::string current_base{ "0" };

View File

@ -42,7 +42,7 @@ CCVarContainer::CCVarContainer(IWidget* parent, CatVar* var) : CBaseContainer("c
} }
CDropdown* dd = new CDropdown(GetName() + "_control", this); CDropdown* dd = new CDropdown(GetName() + "_control", this);
for (int i = var->enum_type->min_value; i <= var->enum_type->max_value; i++) { for (int i = var->enum_type->min_value; i <= var->enum_type->max_value; i++) {
//dd->AddValue(var->enum_type->Name(i)); dd->AddValue(var->enum_type->Name(i));
} }
dd->SetCallback([this](CDropdown*, int value) { dd->SetCallback([this](CDropdown*, int value) {
m_pVar->SetValue(value); m_pVar->SetValue(value);

View File

@ -104,7 +104,7 @@ void ItemVariable::Draw(int x, int y) {
val = std::to_string((float)catvar); val = std::to_string((float)catvar);
} break; } break;
case CV_ENUM: { case CV_ENUM: {
//val = catvar.enum_type->Name((int)catvar); val = catvar.enum_type->Name((int)catvar);
} break; } break;
case CV_STRING: { case CV_STRING: {
val = std::string(catvar.GetString()); val = std::string(catvar.GetString());