Hi,
is there a chance to get a new member function like
bool cMenuEditStrItem::InEditMode() { return pos > -1; }
that returns the edit state on an item? I need this to set different color buttons for an edit item depending on its edit state. My current solution compares item text and value and is quite ugly ;-) :
bool InEditMode(const char* ItemText, const char* ItemName, const char* ItemValue) { bool bEditMode = true; // ugly solution to detect, if in edit mode char* value = strdup(ItemText); strreplace(value, ItemName, ""); strreplace(value, ":\t", ""); // for bigpatch strreplace(value, "\t", ""); if (strlen(value) == strlen(ItemValue)) bEditMode = false; free(value); return bEditMode; }
BR,
Christian