public void Draw(float x = 0, float y = 0) { float gw = (float)gauge.GetWidth(); float gh = (float)gauge.GetHeight(); float sw = (float)skin.width; float sh = (float)skin.height; float w = sw / gw; float h = sh / gh; Rect off = new Rect(0.0f, 0.0f, 1.0f, 1.0f); Rect skinBounds = new Rect(x, y - sh + offset, sw, sh); GUI.DrawTextureWithTexCoords(skinBounds, skin, off, false); Next(); }
private void AlignToGauge() { int x = gauge.GetX(); int y = gauge.GetY(); if (x + TOOLTIP_WIDTH + 10 < Screen.width) { SetPosition(x + gauge.GetWidth(), y); } else { SetPosition(x - TOOLTIP_WIDTH, y); } }
public void Draw(float x = 0, float y = 0) { float gw = (float)gauge.GetWidth(); float gh = (float)gauge.GetHeight(); float sw = this.width; float sh = this.height; float w = sw / gw; float h = sh / gh; position.x = x; position.y = y - sh + offset; position.width = sw; position.height = sh; GUI.DrawTextureWithTexCoords(position, texture, texCoords, false); Next(); }
public void snap(AbstractGauge gauge) { checkSnap(gauge, gauge.GetX(), gauge.GetY(), gauge.GetWidth(), gauge.GetHeight()); }