public GuiTextBlockLoadDialog(GUIStyle style, string text, GUIContentLoaderModelViewer contentLoader, ContentType contentType) : this( position : Vector2.Zero, dimensions : style.DimensionsStyle, text : text, guiContentLoader : contentLoader, contentType : contentType, font : style.TextFontStyle, blockColor : style.BlockColorStyle, textColor : style.TextColorStyle, textAlignment : GUIStyle.TextAlignment.Left, textBorder : style.TextBorderStyle, layer : 0, alignment : style.GuiAlignmentStyle, parentDimensions : style.ParentDimensionsStyle ) { }
public GuiTextBlockLoadDialog(Vector2 position, Vector2 dimensions, string text, GUIContentLoaderModelViewer guiContentLoader, ContentType contentType, SpriteFont font, Color blockColor, Color textColor, GUIStyle.TextAlignment textAlignment = GUIStyle.TextAlignment.Center, Vector2 textBorder = default(Vector2), int layer = 0, GUIStyle.GUIAlignment alignment = GUIStyle.GUIAlignment.None, Vector2 parentDimensions = default(Vector2)) : base(position, dimensions, text, font, blockColor, textColor, textAlignment, textBorder, layer) { _loadedObjectName.Append("..."); //Initialize the loader and the kind of content we want to retrieve GUILoader = guiContentLoader; Type type = null; switch (contentType) { case ContentType.Texture2D: type = typeof(Texture2D); break; case ContentType.Model: type = typeof(AnimatedModel); break; } LoaderMethod = GUILoader.GetType().GetMethod("LoadContentFile").MakeGenericMethod(type); }
public void Load(ContentManager content) { _guiContentLoader = new GUIContentLoaderModelViewer(); _guiContentLoader.Load(content); }