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(); }
public DecorWidget CreateDecorWidget(TrayLocation trayLoc, string name, string templateName) { DecorWidget dw = new DecorWidget(name, templateName); MoveWidgetToTray(dw, trayLoc); return(dw); }
public void HideLogo() { if (IsLogoVisible()) { DestroyWidget(_logo); _logo = null; } }
public void ShowLogo(TrayLocation trayLoc, int place = -1) { if (!IsLogoVisible()) { _logo = CreateDecorWidget(TrayLocation.None, Name + "/Logo", "SdkTrays/Logo"); } MoveWidgetToTray(_logo, trayLoc, place); }