Fix Godot 3.0 compatibility.

This commit is contained in:
Pieter-Jan Briers
2019-03-05 21:56:47 +01:00
parent 19a7e21d47
commit 20e5fe9b4d
2 changed files with 7 additions and 2 deletions

View File

@@ -510,7 +510,10 @@ namespace SS14.Client.Graphics.Drawing
public Texture Texture
{
get => _texture ?? (GameController.OnGodot ? new GodotTextureSource(gdStyleBox.Texture) : null);
// In Godot 3.0, StyleBoxTexture.Texture is a plain resource.
// So we need this cast.
// ReSharper disable once RedundantCast
get => _texture ?? (GameController.OnGodot ? new GodotTextureSource((Godot.Texture)gdStyleBox.Texture) : null);
// Woo implicit casts.
set
{

View File

@@ -14,7 +14,9 @@ namespace SS14.Client.UserInterface.Controls
{
}
internal Container(Godot.Container sceneControl) : base(sceneControl)
// So for SOME REASON Godot.TabContainer wasn't a Container until 3.1.
// ???
internal Container(Godot.Control sceneControl) : base(sceneControl)
{
}