public MenuBox( Texture2D _img, int final_x, int final_y, int start_x, int start_y, ControlDelegate onControlUpdate, RenderDelegate onDraw ) { image = _img; OnControlUpdate = onControlUpdate; OnDraw = onDraw; x = final_x; y = final_y; bounds = new Rectangle( x, y, image.Width, image.Height ); color_bounds = new Rectangle( x, y, image.Width, image.Height ); color_bounds.Inflate( -2, -2 ); McgLayer l = _.sg.renderstack.GetLayer( "menu" ); rendernode = l.AddNode( new McgNode( onDraw, l, start_x, start_y, final_x, final_y, MainMenu.delay ) ); }
public McgNode AddNode( McgNode n ) { nodes.Add( n ); return n; }