public override void Render() { if (disposing || !IsVisible()) { return; } clippingRI.Clear(DrawBackground ? CluwneLib.SystemColorToSFML(BackgroundColor) : SFML.Graphics.Color.Transparent); clippingRI.BeginDrawing(); foreach (GuiComponent component in components) { if (inner_focus != null && component == inner_focus) { continue; } Point oldPos = component.Position; component.Position = new Point(component.Position.X - (int)scrollbarH.Value, component.Position.Y - (int)scrollbarV.Value); component.Update(0); //2 Updates per frame D: component.Render(); if (CluwneLib.Debug.RenderingDelay > 0) { clippingRI.EndDrawing(); clippingRI.Blit(Position, Color.White); clippingRI.BeginDrawing(); } component.Position = oldPos; component.Update(0); } if (inner_focus != null) { Point oldPos = inner_focus.Position; inner_focus.Position = new Point(inner_focus.Position.X - (int)scrollbarH.Value, inner_focus.Position.Y - (int)scrollbarV.Value); inner_focus.Update(0); //2 Updates per frame D: inner_focus.Render(); inner_focus.Position = oldPos; inner_focus.Update(0); } clippingRI.EndDrawing(); clippingRI.Blit(Position, Color.White); // clippingRI.Blit(Position.X, Position.Y,clippingRI.Height, clippingRI.Width, Color.White, BlitterSizeMode.Crop); scrollbarH.Render(); scrollbarV.Render(); if (DrawBorder) { CluwneLib.drawHollowRectangle(ClientArea.X, ClientArea.Y, ClientArea.Width, ClientArea.Height, BorderSize, Color.Black); } }
public override void Render() { if (disposing || !IsVisible()) { return; } clippingRI.Clear((DrawBackground ? BackgroundColor : Color4.Transparent).Convert()); clippingRI.BeginDrawing(); foreach (GuiComponent component in components) { if (inner_focus != null && component == inner_focus) { continue; } var oldPos = component.Position; component.Position = new Vector2i(component.Position.X - (int)scrollbarH.Value, component.Position.Y - (int)scrollbarV.Value); component.Update(0); //2 Updates per frame D: component.Render(); component.Position = oldPos; component.Update(0); } if (inner_focus != null) { var oldPos = inner_focus.Position; inner_focus.Position = new Vector2i(inner_focus.Position.X - (int)scrollbarH.Value, inner_focus.Position.Y - (int)scrollbarV.Value); inner_focus.Update(0); //2 Updates per frame D: inner_focus.Render(); inner_focus.Position = oldPos; inner_focus.Update(0); } clippingRI.EndDrawing(); clippingRI.Blit(Position.X, Position.Y, clippingRI.Height, clippingRI.Width, Color.White, BlitterSizeMode.None); scrollbarH.Render(); scrollbarV.Render(); if (DrawBorder) { CluwneLib.drawHollowRectangle(ClientArea.Left, ClientArea.Top, ClientArea.Width, ClientArea.Height, BorderSize, Color4.Black); } clippingRI.EndDrawing(); }
public override void Render() { if (disposing || !IsVisible()) { return; } clippingRI.Clear(DrawBackground ? BackgroundColor : Color.Transparent); clippingRI.BeginDrawing(); foreach (GuiComponent component in components) { if (inner_focus != null && component == inner_focus) { continue; } Point oldPos = component.Position; component.Position = new Point(component.Position.X - (int)scrollbarH.Value, component.Position.Y - (int)scrollbarV.Value); component.Update(0); //2 Updates per frame D: component.Render(); component.Position = oldPos; component.Update(0); } if (inner_focus != null) { Point oldPos = inner_focus.Position; inner_focus.Position = new Point(inner_focus.Position.X - (int)scrollbarH.Value, inner_focus.Position.Y - (int)scrollbarV.Value); inner_focus.Update(0); //2 Updates per frame D: inner_focus.Render(); inner_focus.Position = oldPos; inner_focus.Update(0); } clippingRI.EndDrawing(); clippingRI.Blit(Position.X, Position.Y, clippingRI.Width, clippingRI.Height, Color.White, BlitterSizeMode.Crop); scrollbarH.Render(); scrollbarV.Render(); if (DrawBorder) { Gorgon.CurrentRenderTarget.Rectangle(ClientArea.X, ClientArea.Y, ClientArea.Width, ClientArea.Height, Color.Black); } }