Ejemplo n.º 1
0
 public void DrawRect(Box2 rect, Color color, bool filled = true)
 {
     CheckDisposed();
     if (filled)
     {
         VS.CanvasItemAddRect(Item, rect.Convert(), color.Convert());
     }
     else
     {
         DrawLine(rect.TopLeft, rect.TopRight, color);
         DrawLine(rect.TopRight, rect.BottomRight, color);
         DrawLine(rect.BottomRight, rect.BottomLeft, color);
         DrawLine(rect.BottomLeft, rect.TopLeft, color);
     }
 }
Ejemplo n.º 2
0
 public void DrawTextureRect(Texture texture, Box2 rect, bool tile, Color?modulate = null, bool transpose = false, Texture normalMap = null)
 {
     CheckDisposed();
     texture.GodotTexture.DrawRect(Item, rect.Convert(), tile, modulate?.Convert(), transpose, normalMap);
 }
Ejemplo n.º 3
0
 public View(Box2 box)
 {
     SFMLView = new SView(box.Convert());
 }
Ejemplo n.º 4
0
 public void DrawStyleBox(StyleBox styleBox, Box2 box)
 {
     CheckDisposed();
     styleBox.GodotStyleBox.Draw(Item, box.Convert());
 }
Ejemplo n.º 5
0
 public void SetItemIconRegion(int idx, Box2 region)
 {
     SceneControl.SetItemIconRegion(idx, region.Convert());
 }