Esempio n. 1
0
        //epic
        public ButtonSet(CommitGumpBase gump, List <String> items,
                         int Columns, int XSpacer,
                         int YSpacer, int OnImage,
                         int OffImage, int StartX,
                         int StartY, int ButtonIdOffset,
                         QueryButtonStatusDelegate queryStatusMethod, ButtonPressedDelegate pressMethod, QueryLabelColourDelegate queryColourMethod
                         )
        {
            m_Gump                  = gump;
            m_Columns               = Columns;
            m_XSpacer               = XSpacer;
            m_YSpacer               = YSpacer;
            m_OnImage               = OnImage;
            m_OffImage              = OffImage;
            m_StartX                = StartX;
            m_StartY                = StartY;
            m_ButtonIdOffset        = ButtonIdOffset;
            m_QueryButtonStatus     = queryStatusMethod;
            m_ButtonPress           = pressMethod;
            m_QueryButtonTextColour = queryColourMethod;
            int id = 0;

            foreach (string s in items)
            {
                _setData.Add(id, s);
                ++id;                                                    //LOCAL id - this is used with the offset for the gump.  The point here is so the calee doesn't have to care about IDs.
            }
            items.Clear();

            ((ICommitGumpEntity)this).Create();
        }
Esempio n. 2
0
        //epic
        public ButtonSet(CommitGumpBase gump, Type enumType,
                         int Columns, int XSpacer,
                         int YSpacer, int OnImage,
                         int OffImage, int StartX,
                         int StartY, int ButtonIdOffset,
                         QueryButtonStatusDelegate queryStatusMethod, ButtonPressedDelegate pressMethod, QueryLabelColourDelegate queryColourMethod
                         )
        {
            if (!enumType.IsEnum)
            {
                return;
            }
            if (Enum.GetUnderlyingType(enumType) != typeof(int))
            {
                return;
            }
            m_Gump                  = gump;
            m_Columns               = Columns;
            m_XSpacer               = XSpacer;
            m_YSpacer               = YSpacer;
            m_OnImage               = OnImage;
            m_OffImage              = OffImage;
            m_StartX                = StartX;
            m_StartY                = StartY;
            m_ButtonIdOffset        = ButtonIdOffset;
            m_QueryButtonStatus     = queryStatusMethod;
            m_ButtonPress           = pressMethod;
            m_QueryButtonTextColour = queryColourMethod;

            foreach (int val in Enum.GetValues(enumType))
            {
                _setData.Add(val, Enum.GetName(enumType, val));
            }

            ((ICommitGumpEntity)this).Create();
        }