Exemplo n.º 1
0
        /// <summary>
        /// base class constructor
        /// </summary>
        /// <param name="text"></param>
        /// <param name="itemId"></param>
        /// <param name="itemData"></param>
        /// <param name="disabled"></param>
        /// <param name="autoDelete"></param>
        protected ListboxItem(string text,
                              int itemId      = 0,
                              object itemData = null,
                              bool disabled   = false,
                              bool autoDelete = true)
        {
#if CEGUI_BIDI_SUPPORT
            _bidiVisualMapping = new NBidiVisualMapping();
#else
            _bidiVisualMapping = null;
#endif
            _itemId     = itemId;
            _itemData   = itemData;
            Selected    = false;
            _disabled   = disabled;
            _autoDelete = autoDelete;
            Owner       = null;
            SelectCols  = new ColourRect(DefaultSelectionColour);
            SelectBrush = null;

            SetText(text);
        }
Exemplo n.º 2
0
        /// <summary>
        /// base class constructor
        /// </summary>
        /// <param name="text"></param>
        /// <param name="itemId"></param>
        /// <param name="itemData"></param>
        /// <param name="disabled"></param>
        /// <param name="autoDelete"></param>
        public TreeItem(string text, int itemId = 0, object itemData = null, bool disabled = false,
                        bool autoDelete         = true)
        {
            d_bidiVisualMapping = new NBidiVisualMapping();
            d_bidiDataValid     = false;
            d_itemId            = itemId;
            d_itemData          = itemData;
            d_selected          = false;
            d_disabled          = disabled;
            d_autoDelete        = autoDelete;
            d_buttonLocation    = Rectf.Zero;
            d_owner             = null;
            d_selectCols        = new ColourRect(DefaultSelectionColour);
            d_selectBrush       = null;
            d_textCols          = new ColourRect(DefaultTextColour);
            d_font                = null;
            d_iconImage           = null;
            d_isOpen              = false;
            d_renderedStringValid = false;

            SetText(text);
        }