void EscapeAction(int index) { EditableElements target = activeEditables[index]; if (target.type != EditableType.control && target.member != SectionDataBase.@base) { FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(target.member.ToString()); if (menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; RestartMenu(GetEditableElementBySdb(target.member)); } } else if (target.type == EditableType.control) { SectionDataBase sdb = sdbc.GetChangebleElementWithId(target.member)[target.outIndex].subsection[target.inIndex]; FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()); if (menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; RestartMenu(target); } else if (target.member != SectionDataBase.@base) { EscapeAction(index - 1); } } }
void ControlMainAction(EditableElements target) { SectionDataBase sdb = sdbc.GetChangebleElementWithId(target.member)[target.outIndex].subsection[target.inIndex]; FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()); if (menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; } else { menusAtivos |= flag; } RestartMenu(target); }
private void ChangeAction(int change, int index) { EditableElements target = activeEditables[index]; if (target.type == EditableType.control) { if (change != 0) { SectionDataBase sdb = sdbc.GetChangebleElementWithId(target.member)[target.outIndex].subsection[target.inIndex]; FlagSectionDataBase flag = StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()); if (change > 0 && !menusAtivos.HasFlag(flag)) { menusAtivos |= flag; } else if (change < 0 && menusAtivos.HasFlag(flag)) { menusAtivos &= ~flag; } RestartMenu(target); } } else if (target.type == EditableType.mesh || target.type == EditableType.texture) { if (change != 0) { ChangeElementMainAction(target, change); } } }
bool VerifyActiveDbView(SectionDataBase sdb) { return(menusAtivos.HasFlag(StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString()))); }