Пример #1
0
    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);
            }
        }
    }
Пример #2
0
    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);
    }
Пример #3
0
    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);
            }
        }
    }
Пример #4
0
 bool VerifyActiveDbView(SectionDataBase sdb)
 {
     return(menusAtivos.HasFlag(StringForEnum.GetEnum <FlagSectionDataBase>(sdb.ToString())));
 }