public void Open(UIBox2?box = null) { if (GameController.OnGodot) { SceneControl.Call("popup", box?.Convert()); } }
public void DrawStyleBox(StyleBox styleBox, UIBox2 box) { if (!GameController.OnGodot) { return; } CheckDisposed(); styleBox.GodotStyleBox.Draw(Item, box.Convert()); }
public void Draw(DrawingHandleScreen handle, UIBox2 box) { if (GameController.OnGodot) { GodotStyleBox.Draw(handle.Item, box.Convert()); } else { DoDraw(handle, box); } }
public void DrawTextureRect(Texture texture, UIBox2 rect, bool tile, Color?modulate = null, bool transpose = false, Texture normalMap = null) { CheckDisposed(); if (_renderHandle != null) { _renderHandle.DrawTextureRect(texture, rect.TopLeft, rect.BottomRight, modulate, _handleId); } else if (Item != null) { texture.GodotTexture.DrawRect(Item, rect.Convert(), tile, modulate?.Convert(), transpose, normalMap); } }
public void DrawTextureRectRegion(Texture texture, UIBox2 rect, UIBox2 subRegion, Color?modulate = null) { CheckDisposed(); var actualModulate = (modulate ?? Color.White) * Modulate; if (_renderHandle != null) { _renderHandle.DrawTextureRect(texture, rect.TopLeft, rect.BottomRight, actualModulate, subRegion, _handleId); } else if (Item != null) { texture.GodotTexture.DrawRect(Item, rect.Convert(), false, actualModulate.Convert()); } }
public void DrawRect(UIBox2 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); } }
public void DrawStyleBox(StyleBox styleBox, UIBox2 box) { if (styleBox == null) { throw new ArgumentNullException(nameof(styleBox)); } CheckDisposed(); if (GameController.OnGodot) { styleBox.GodotStyleBox.Draw(Item, box.Convert()); } else { styleBox.Draw(this, box); } }
public void Open(UIBox2?box = null) { if (GameController.OnGodot) { SceneControl.Call("popup", box?.Convert()); } else { if (box != null) { Position = box.Value.TopLeft; Size = box.Value.Size; } Visible = true; } }
public void Open(UIBox2?box = null) { if (GameController.OnGodot) { SceneControl.Call("popup", box?.Convert()); } else { if (box != null) { Position = box.Value.TopLeft; Size = box.Value.Size; } Visible = true; UserInterfaceManagerInternal.PushModal(this); } }
public AtlasTexture(Texture texture, UIBox2 subRegion) { DebugTools.Assert(SubRegion.Right < texture.Width); DebugTools.Assert(SubRegion.Bottom < texture.Height); DebugTools.Assert(SubRegion.Left >= 0); DebugTools.Assert(SubRegion.Top >= 0); if (GameController.OnGodot) { GodotTexture = new Godot.AtlasTexture { Atlas = texture, Region = subRegion.Convert() }; } SubRegion = subRegion; SourceTexture = texture; }
public void DrawRect(UIBox2 rect, Color color, bool filled = true) { CheckDisposed(); color *= Modulate; if (filled) { if (_renderHandle != null) { _renderHandle.DrawTextureRect(Texture.White, rect.TopLeft, rect.BottomRight, color, null, _handleId); } else if (Item != null) { 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); } }
public void Open(UIBox2?box = null) { SceneControl.Popup_(box?.Convert()); }
public void SetItemIconRegion(int idx, UIBox2 region) { SceneControl.SetItemIconRegion(idx, region.Convert()); }
public void DrawTextureRect(Texture texture, UIBox2 rect, bool tile, Color?modulate = null, bool transpose = false, Texture normalMap = null) { CheckDisposed(); texture.GodotTexture.DrawRect(Item, rect.Convert(), tile, modulate?.Convert(), transpose, normalMap); }
public void DrawStyleBox(StyleBox styleBox, UIBox2 box) { CheckDisposed(); styleBox.GodotStyleBox.Draw(Item, box.Convert()); }