/// <summary> /// Init this widget. /// </summary> public override void Initialize() { base.Initialize(); colors = new ColorRect(ColorEx.WhiteSmoke); TextureAtlas atlas = AtlasManager.Instance.GetTextureAtlas(ImagesetName); topLeft = atlas.GetTextureInfo(TopLeftBubbleImageName); topRight = atlas.GetTextureInfo(TopRightBubbleImageName); bottomLeft = atlas.GetTextureInfo(BottomLeftBubbleImageName); bottomRight = atlas.GetTextureInfo(BottomRightBubbleImageName); left = atlas.GetTextureInfo(LeftBubbleImageName); right = atlas.GetTextureInfo(RightBubbleImageName); top = atlas.GetTextureInfo(TopBubbleImageName); bottom = atlas.GetTextureInfo(BottomBubbleImageName); background = atlas.GetTextureInfo(BackgroundImageName); bottomCenter = atlas.GetTextureInfo(TailBubbleImageName); textWidget.HorizontalFormat = HorizontalTextFormat.WordWrapCentered; textWidget.VerticalFormat = VerticalTextFormat.Bottom; textWidget.NormalTextStyle = new TextStyle(); textWidget.NormalTextStyle.textColor = ColorEx.Black; }
public LoadingScreen(SizeF size, SizeF maxSize) { loadWindow = new ImageWindow("Window/LoadWindow"); loadWindow.Position = new PointF(0, 0); loadWindow.MaximumSize = maxSize; loadWindow.Colors = new ColorRect(ColorEx.Black); loadWindow.Size = size; Texture texture = TextureManager.Instance.Load("loadscreen.dds"); TextureAtlas atlas = new TextureAtlas("_glue", texture); atlas.DefineImage("LoadImage1", new PointF(0, 0), new SizeF(1024, 768)); loadWindow.VerticalFormat = VerticalImageFormat.Stretched; loadWindow.HorizontalFormat = HorizontalImageFormat.Stretched; loadWindow.SetImage(atlas.GetTextureInfo("LoadImage1")); loadWindow.Visible = true; }