public VerticalGaugeZoom(VerticalGauge gauge, Texture2D skin, Texture2D scale) { this.value = 0.0f; this.gauge = gauge; this.bounds.width = (float)Math.Truncate(gauge.GetWidth() * ZOOM); this.bounds.height = (float)Math.Truncate(gauge.GetHeight() / 3.0f); this.scale = scale; this.skin = skin; this.gaugeSkinBounds.width = (float)Math.Truncate(gauge.GetWidth() * ZOOM); this.gaugeSkinBounds.height = (float)Math.Truncate(gauge.GetHeight() * ZOOM); // this.skinBounds.width = this.bounds.width; this.skinBounds.height = this.bounds.height; }
public void Draw() { bounds.x = gauge.GetX() - bounds.width / 2 + gauge.GetWidth() / 2; bounds.y = gauge.GetY() + (float)gauge.GetHeight() / 2 - bounds.height / 2; bounds = GUI.Window(ID, bounds, OnWindowInternal, "", GUI.skin.window); }