Exemple #1
0
        internal EmbedMenu(EmbedMenuDel initAct, UserT user, ChannelT channel, ref PooledList <EmbedMenu <UserT, ChannelT> > emHistory, ref PooledList <EmbedMenuAct> acts)
        {
            InitAct = initAct;

            User = user;

            Channel = channel;

            EMHistory = emHistory;

            Acts = acts;

            CurrentEMIndex = 0;

            //Page defaults

            CurrentPageNumber = 0;

            MaxElemsPerPage = 5;

            Pages = EMHelpers.DivideAndRoundUpFast(Acts.Count, MaxElemsPerPage);

            Unsafe.SkipInit(out Title);

            Unsafe.SkipInit(out Desc);

            Unsafe.SkipInit(out CurrentMsg);
        }
Exemple #2
0
        public EmbedMenu(ref EmbedMenuAct ExecutedEMAct, ref EmbedMenu <UserT, ChannelT> PrevEM, string title, string desc)
        {
            InitAct = ExecutedEMAct.Act;

            EMHistory = PrevEM.EMHistory;

            Title = title;

            Desc = desc;

            Acts = PrevEM.Acts;

            CurrentEMIndex = unchecked (++PrevEM.CurrentEMIndex);

            //Page defaults

            CurrentPageNumber = 0;

            MaxElemsPerPage = 5;

            Pages = EMHelpers.DivideAndRoundUpFast(Acts.Count, MaxElemsPerPage);

            //User creds

            User = PrevEM.User;

            Channel = PrevEM.Channel;

            Unsafe.SkipInit(out CurrentMsg);
        }