Ejemplo n.º 1
0
        public void DestroyWidget(Widget widget)
        {
            Contract.ArgumentNotNull(widget, "widget");

            // in case special widgets are destroyed manually, set them to 0
            if (widget == _logo)
            {
                _logo = null;
            }
            else if (widget == _statsPanel)
            {
                _statsPanel = null;
            }
            else if (widget == _fpsLabel)
            {
                _fpsLabel = null;
            }

            _trays[(int)widget.TrayLocation].RemoveChild(widget.Name);

            var wList = _widgets[(int)widget.TrayLocation];

            wList.Remove(widget);

            //if (widget == mExpandedMenu) setExpandedMenu(0);

            widget.Cleanup();

            //mWidgetDeathRow.push_back(widget);

            AdjustTrays();
        }
Ejemplo n.º 2
0
        public DecorWidget CreateDecorWidget(TrayLocation trayLoc, string name, string templateName)
        {
            DecorWidget dw = new DecorWidget(name, templateName);

            MoveWidgetToTray(dw, trayLoc);
            return(dw);
        }
Ejemplo n.º 3
0
 public void HideLogo()
 {
     if (IsLogoVisible())
     {
         DestroyWidget(_logo);
         _logo = null;
     }
 }
Ejemplo n.º 4
0
        public void ShowLogo(TrayLocation trayLoc, int place = -1)
        {
            if (!IsLogoVisible())
            {
                _logo = CreateDecorWidget(TrayLocation.None, Name + "/Logo", "SdkTrays/Logo");
            }

            MoveWidgetToTray(_logo, trayLoc, place);
        }