Custom, decorative widget created from a template.
Inheritance: Widget
コード例 #1
0
ファイル: SdkTrays.cs プロジェクト: ryan-bunker/axiom3d
		/// <summary>
		/// Destroys a widget.
		/// </summary>
		/// <param name="widget"></param>
		public void DestroyWidget( Widget widget )
		{
			if ( widget == null )
			{
				new AxiomException( "Widget does not exist,TrayManager.DestroyWidget" );
			}

			// in case special widgets are destroyed manually, set them to 0
			if ( widget == this.Logo )
			{
				this.Logo = null;
			}
			else if ( widget == this.StatsPanel )
			{
				this.StatsPanel = null;
			}
			else if ( widget == this.mFpsLabel )
			{
				this.mFpsLabel = null;
			}

			this.mTrays[ (int)widget.TrayLocation ].RemoveChild( widget.Name );

			WidgetList wList = this.mWidgets[ (int)widget.TrayLocation ];
			wList.Remove( widget );
			if ( widget == ExpandedMenu )
			{
				ExpandedMenu = null;
			}

			widget.Cleanup();

			this.mWidgetDeathRow.Add( widget );

			AdjustTrays();
		}
コード例 #2
0
ファイル: SdkTrays.cs プロジェクト: ryan-bunker/axiom3d
		/// <summary>
		/// Shows logo in the specified location.
		/// </summary>
		/// <param name="trayLoc"></param>
		/// <param name="place"></param>
		public void ShowLogo( TrayLocation trayLoc, int place )
		{
			if ( !IsLogoVisible )
			{
				this.Logo = CreateDecorWidget( trayLoc, this.mName + "/Logo", "Panel", "SdkTrays/Logo" );
			}
			MoveWidgetToTray( this.Logo, trayLoc, place );
		}
コード例 #3
0
ファイル: SdkTrays.cs プロジェクト: ryan-bunker/axiom3d
		/// <summary>
		/// 
		/// </summary>
		public void HideLogo()
		{
			if ( IsLogoVisible )
			{
				DestroyWidget( this.Logo );
				this.Logo = null;
			}
		}
コード例 #4
0
ファイル: SdkTrays.cs プロジェクト: ryan-bunker/axiom3d
		/// <summary>
		/// 
		/// </summary>
		/// <param name="trayLoc"></param>
		/// <param name="name"></param>
		/// <param name="typeName"></param>
		/// <param name="templateName"></param>
		/// <returns></returns>
		public DecorWidget CreateDecorWidget( TrayLocation trayLoc, String name, String typeName, String templateName )
		{
			var dw = new DecorWidget( name, typeName, templateName );
			MoveWidgetToTray( dw, trayLoc );
			return dw;
		}