public GDIStaticText(string text, string fontName, int fontSize, Brush brush, PointF position, bool neededAdjustWithFont, AlignMethod alignment = AlignMethod.CENTER) { winHeight = Engine.WinHeight; winWidth = Engine.WinWidth; font = new Font(fontName, fontSize); this.text = text; this.brush = brush; this.position = position; this.alignment = alignment; this.neededAdjustWithFont = neededAdjustWithFont; left = new UIWidgetValue(metrics, position.X, winWidth); top = new UIWidgetValue(metrics, position.Y, winHeight); }
public GDISelectableOption(string text, string fontName, int fontSize, Brush brush, PointF position, ref List <GDISelectableOption> options, bool needAdjustWithFont = false, AlignMethod alignment = AlignMethod.CENTER, UIMetrics metrics = UIMetrics.Absolute) { winHeight = Engine.WinHeight; winWidth = Engine.WinWidth; font = new Font(fontName, fontSize); this.brush = brush; this.position = position; this.text = text; inited = false; if (needAdjustWithFont) { this.position.Y = this.position.Y - font.Height; } this.alignment = alignment; }
public NiPSParticleSystem() { simulator = null; generator = null; numEmitters = (uint)0; numSpawners = (uint)0; deathSpawner = null; maxNumParticles = (uint)0; hasColors = false; hasRotations = false; hasRotationAxes = false; hasAnimatedTextures = false; worldSpace = false; normalMethod = (AlignMethod)0; upMethod = (AlignMethod)0; livingSpawner = null; numSpawnRateKeys = (byte)0; pre_rpi = false; }
public Sprite(Image image, PointF position, int collideCheckTolerance = 15, float scale = 1, AlignMethod alignment = AlignMethod.CENTER, int movement_type = 0) { this.image = image; this.position = position; this.scale = scale; this.movement_type = movement_type; this.collideCheckTolerance = collideCheckTolerance; destPos = new PointF(-1, -1); switch (alignment) { case AlignMethod.CENTER: this.position = new PointF(position.X - (image.Width * scale) / 2, position.Y - (image.Height * scale) / 2); break; case AlignMethod.BOTTOM: this.position = new PointF(position.X - (image.Width * scale) / 2, position.Y - (image.Height * scale) / 3 * 2); break; } }
public GDISpriteButton(Bitmap image, Bitmap hoverImage, PointF position, int tolenrece = 15, float scale = 1, AlignMethod align = AlignMethod.CENTER) { winHeight = Engine.WinHeight; winWidth = Engine.WinWidth; sprite = new Sprite(image, position, tolenrece, scale, align); hoverSprite = new Sprite(hoverImage, position, tolenrece, scale, align); this.position = position; area = new RectangleF(position.X - (image.Width * scale / 2), position.Y - (image.Height * scale / 2), image.Width * scale, image.Height * scale); left = new UIWidgetValue(metrics, position.X, winWidth); top = new UIWidgetValue(metrics, position.Y, winHeight); }