Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
drewcassidy committed Dec 20, 2020
2 parents 1e7c6d8 + 3173dd9 commit 938babb
Show file tree
Hide file tree
Showing 14 changed files with 128 additions and 227 deletions.
2 changes: 2 additions & 0 deletions Assets/Scripts/TextRenderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ void Start() {
Debug.Log("starting...");

StartCoroutine(OnRender());
var thing = new GameObject();
thing.AddComponent<TextMeshPro>();
}

// Update is called once per frame
Expand Down
Binary file modified GameData/ConformalDecals/Plugins/ConformalDecals.dll
Binary file not shown.
10 changes: 5 additions & 5 deletions GameData/ConformalDecals/Versioning/ConformalDecals.version
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
{
"MAJOR":0,
"MINOR":2,
"PATCH":6,
"BUILD":1
"PATCH":7,
"BUILD":0
},
"KSP_VERSION":
{
"MAJOR":1,
"MINOR":10,
"PATCH":1
"MINOR":11,
"PATCH":0
},
"KSP_VERSION_MIN":{
"MAJOR":1,
Expand All @@ -22,7 +22,7 @@
},
"KSP_VERSION_MAX":{
"MAJOR":1,
"MINOR":10,
"MINOR":11,
"PATCH":99
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Conformal Decals v0.2.6
[![Build Status](https://travis-ci.org/drewcassidy/KSP-Conformal-Decals.svg?branch=release)](https://travis-ci.org/drewcassidy/KSP-Conformal-Decals) [![Art: CC BY-SA 4.0](https://img.shields.io/badge/Art%20License-CC%20BY--SA%204.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![Code: GPL v3](https://img.shields.io/badge/Code%20License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
# Conformal Decals v0.2.7
[![Build Status](https://travis-ci.com/drewcassidy/KSP-Conformal-Decals.svg?branch=release)](https://travis-ci.com/drewcassidy/KSP-Conformal-Decals) [![Art: CC BY-SA 4.0](https://img.shields.io/badge/Art%20License-CC%20BY--SA%204.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![Code: GPL v3](https://img.shields.io/badge/Code%20License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

![Screenshot](http://pileof.rocks/KSP/images/ConformalDecalsHeader.png)

Expand Down
9 changes: 5 additions & 4 deletions Source/ConformalDecals/ConformalDecals.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<IsPackable>false</IsPackable>
<PlatformTarget>x64</PlatformTarget>
<NoWarn>1701;1702;CS0649;CS1591</NoWarn>
<AssemblyVersion>0.2.7</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -35,19 +36,19 @@
</ItemGroup>

<ItemGroup>
<Compile Remove="dlls\**"/>
<Compile Remove="dlls\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="dlls\**"/>
<EmbeddedResource Remove="dlls\**" />
</ItemGroup>

<ItemGroup>
<None Remove="dlls\**"/>
<None Remove="dlls\**" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="/bin/cp -v '$(OutDir)ConformalDecals.dll' '$(SolutionDir)../GameData/ConformalDecals/Plugins'" IgnoreExitCode="true"/>
<Exec Command="/bin/cp -v '$(OutDir)ConformalDecals.dll' '$(SolutionDir)../GameData/ConformalDecals/Plugins'" IgnoreExitCode="true" />
<!--Fuck you MSBuild stop trying to run CMD.exe on macOS-->
</Target>

Expand Down
4 changes: 1 addition & 3 deletions Source/ConformalDecals/ModuleConformalText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void SetOutlineColor() {
private MaterialColorProperty _outlineColorProperty;
private MaterialFloatProperty _outlineWidthProperty;

private TextRenderJob _currentJob;
private DecalText _currentText;

public override void OnLoad(ConfigNode node) {
Expand Down Expand Up @@ -253,7 +252,6 @@ private void UpdateTextRecursive() {
decal.charSpacing = charSpacing;
decal.lineSpacing = lineSpacing;

decal._currentJob = _currentJob;
decal._currentText = _currentText;
decal.UpdateText();
}
Expand All @@ -267,7 +265,7 @@ private IEnumerator UpdateTextLate() {
private void UpdateText() {
// Render text
var newText = new DecalText(text, font, style, vertical, lineSpacing, charSpacing);
var output = TextRenderer.UpdateTextNow(_currentText, newText);
var output = TextRenderer.UpdateText(_currentText, newText);
_currentText = newText;

UpdateTexture(output);
Expand Down
2 changes: 1 addition & 1 deletion Source/ConformalDecals/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[assembly: KSPAssembly("ConformalDecals", 0, 2, 6)]
[assembly: KSPAssembly("ConformalDecals", 0, 2)]
4 changes: 4 additions & 0 deletions Source/ConformalDecals/Text/DecalFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,9 @@ public override int GetHashCode() {
public void OnBeforeSerialize() { }

public void OnAfterDeserialize() { }

public override string ToString() {
return _title;
}
}
}
4 changes: 4 additions & 0 deletions Source/ConformalDecals/Text/DecalText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@ public override int GetHashCode() {
public static bool operator !=(DecalText left, DecalText right) {
return !Equals(left, right);
}

public override string ToString() {
return $"{nameof(_text)}: {_text}, {nameof(_font)}: {_font}, {nameof(_style)}: {_style}, {nameof(_vertical)}: {_vertical}, {nameof(_lineSpacing)}: {_lineSpacing}, {nameof(_charSpacing)}: {_charSpacing}";
}
}
}
35 changes: 0 additions & 35 deletions Source/ConformalDecals/Text/TextRenderJob.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Source/ConformalDecals/Text/TextRenderOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class TextRenderOutput {
/// The rectangle that the rendered text takes up within the texture
public Rect Window { get; private set; }

/// The number of users for this render output. If 0, it can be discarded from the cache and the texture reused
/// The number of users for this render output. If 0, it can be discarded from the cache
public int UserCount { get; set; }

public TextRenderOutput(Texture2D texture, Rect window) {
Expand Down
Loading

0 comments on commit 938babb

Please sign in to comment.