protected override void OnWindow(int id) { // check for on/off AutomaticOnOff(); // check for limits (wont work very well, so disabled at the moment) //AutomaticLimiter(); // damper for smoother changes in the gauges //float h = (float)GetHeight() / (float)(scale.height); damper.SetValue(GetScaleOffset()); float verticalScaleratio = (float)Configuration.UNSCALED_VERTICAL_GAUGE_HEIGHT / (float)SCALE_HEIGHT; // scale float value = damper.GetValue(); Rect off = new Rect(0, value, 1.0f, verticalScaleratio); GUI.DrawTextureWithTexCoords(skinBounds, scale, off, false); // // zoom zoom.value = value; // // flags if (NanoGauges.configuration.gaugeMarkerEnabled) { // draw current state of flags (on/off and limiter) // increment animation step on each draw (flags will not show up immediately) offFlag.Draw(GetWidth() / 2 - 4, 0); limitFlag.Draw(0, 0); } // // skin GUI.DrawTexture(skinBounds, skin); }
private void InternalDrawFlags() { // draw current state of flags (on/off and limiter) // increment animation step on each draw (flags will not show up immediately) offFlag.Draw(GetWidth() - offFlag.GetWidth() - 4 * (float)NanoGauges.configuration.gaugeScaling, 0); limitFlag.Draw(0, 0); // draw flags from subclasses DrawFlags(); }