Merge branch 'main' into feature-multiProject
# Conflicts: # GameData/ConformalDecals/Plugins/ConformalDecals.dll # Source/ConformalDecals/ModuleConformalDecal.cs # Source/ConformalDecals/ModuleConformalText.csfeature-saving
commit
e37cf03f7b
@ -0,0 +1,17 @@
|
||||
// Decals are just paint, so they shouldnt affect a vessel's aerodynamics at all
|
||||
|
||||
@PART[*]:HAS[@MODULE[ModuleConformalDecal]]:After[FerramAerospaceResearch]
|
||||
{
|
||||
!MODULE[GeometryPartModule] {}
|
||||
}
|
||||
|
||||
@PART[*]:HAS[@MODULE[ModuleConformalFlag]]:After[FerramAerospaceResearch]
|
||||
{
|
||||
!MODULE[GeometryPartModule] {}
|
||||
}
|
||||
|
||||
@PART[*]:HAS[@MODULE[ModuleConformalText]]:After[FerramAerospaceResearch]
|
||||
{
|
||||
|
||||
!MODULE[GeometryPartModule] {}
|
||||
}
|
@ -1,116 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)/$(MSBuildToolsVersion)/Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)/$(MSBuildToolsVersion)/Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1ea983f9-42e5-494e-9683-fdac9c9121f4}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<LangVersion>8</LangVersion>
|
||||
<RootNamespace>ConformalDecals</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin/Debug/</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin/Release/</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>bin/Release/ConformalDecals.xml</DocumentationFile>
|
||||
<NoWarn>CS1591,CS0649</NoWarn>
|
||||
<IsPackable>false</IsPackable>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<NoWarn>1701;1702;CS0649;CS1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="KSPAssets, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls\KSPAssets.dll</HintPath>
|
||||
<HintPath>dlls\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Shabby, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/Shabby.dll</HintPath>
|
||||
<HintPath>dlls\Shabby.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.dll</HintPath>
|
||||
<HintPath>dlls\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AssetBundleModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
<HintPath>dlls\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>dlls\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TextCoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.TextCoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.TextRenderingModule.dll</HintPath>
|
||||
<HintPath>dlls\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UIElementsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.UIElementsModule.dll</HintPath>
|
||||
<HintPath>dlls\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>dlls/UnityEngine.UIModule.dll</HintPath>
|
||||
<HintPath>dlls\UnityEngine.UIModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="DecalConfig.cs" />
|
||||
<Compile Include="DecalIconFixer.cs" />
|
||||
<Compile Include="DecalPropertyIDs.cs" />
|
||||
<Compile Include="MaterialProperties/MaterialColorProperty.cs" />
|
||||
<Compile Include="MaterialProperties/MaterialFloatProperty.cs" />
|
||||
<Compile Include="MaterialProperties/MaterialKeywordProperty.cs" />
|
||||
<Compile Include="MaterialProperties/MaterialProperty.cs" />
|
||||
<Compile Include="MaterialProperties/MaterialPropertyCollection.cs" />
|
||||
<Compile Include="MaterialProperties/MaterialTextureProperty.cs" />
|
||||
<Compile Include="ModuleConformalFlag.cs" />
|
||||
<Compile Include="ModuleConformalText.cs" />
|
||||
<Compile Include="ProjectionTarget.cs" />
|
||||
<Compile Include="ModuleConformalDecal.cs" />
|
||||
<Compile Include="Properties/AssemblyInfo.cs" />
|
||||
<Compile Include="Text/DecalFont.cs" />
|
||||
<Compile Include="Text/FontLoader.cs" />
|
||||
<Compile Include="Text/TextRenderer.cs" />
|
||||
<Compile Include="Text/DecalText.cs" />
|
||||
<Compile Include="Text\DecalTextStyle.cs" />
|
||||
<Compile Include="Text\TextRenderOutput.cs" />
|
||||
<Compile Include="Text\TextRenderJob.cs" />
|
||||
<Compile Include="UI/ColorPickerController.cs" />
|
||||
<Compile Include="UI/FontMenuController.cs" />
|
||||
<Compile Include="UI/FontMenuItem.cs" />
|
||||
<Compile Include="UI/TextEntryController.cs" />
|
||||
<Compile Include="UI/UILoader.cs" />
|
||||
<Compile Include="UI/UITag.cs" />
|
||||
<Compile Include="UI\ColorBoxSlider.cs" />
|
||||
<Compile Include="UI\ColorChannelSlider.cs" />
|
||||
<Compile Include="Util/Logging.cs" />
|
||||
<Compile Include="Util/OrientedBounds.cs" />
|
||||
<Compile Include="Util/ParseUtil.cs" />
|
||||
<Compile Include="UI/BoxSlider.cs" />
|
||||
<Compile Include="Util\ColorHSL.cs" />
|
||||
<Compile Include="Util\ColorHSV.cs" />
|
||||
<Compile Include="Util\ColorUtil.cs" />
|
||||
<Compile Remove="dlls\**"/>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)/Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>sh -e -c "cp -v '$(TargetPath)' '$(SolutionDir)/../GameData/ConformalDecals/Plugins'"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Remove="dlls\**"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="dlls\**"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<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>
|
||||
|
||||
</Project>
|
||||
|
||||
|
@ -1,101 +0,0 @@
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable NonReadonlyMemberInGetHashCode
|
||||
|
||||
namespace ConformalDecals.Text {
|
||||
public struct DecalTextStyle : IEquatable<DecalTextStyle> {
|
||||
private FontStyles _fontStyle;
|
||||
private bool _vertical;
|
||||
private float _lineSpacing;
|
||||
private float _charSpacing;
|
||||
|
||||
public FontStyles FontStyle {
|
||||
get => _fontStyle;
|
||||
set => _fontStyle = value;
|
||||
}
|
||||
|
||||
public bool Bold {
|
||||
get => (FontStyle & FontStyles.Bold) != 0;
|
||||
set {
|
||||
if (value) FontStyle |= FontStyles.Bold;
|
||||
else FontStyle &= ~FontStyles.Bold;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Italic {
|
||||
get => (FontStyle & FontStyles.Italic) != 0;
|
||||
set {
|
||||
if (value) FontStyle |= FontStyles.Italic;
|
||||
else FontStyle &= ~FontStyles.Italic;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Underline {
|
||||
get => (FontStyle & FontStyles.Underline) != 0;
|
||||
set {
|
||||
if (value) FontStyle |= FontStyles.Underline;
|
||||
else FontStyle &= ~FontStyles.Underline;
|
||||
}
|
||||
}
|
||||
|
||||
public bool SmallCaps {
|
||||
get => (FontStyle & FontStyles.SmallCaps) != 0;
|
||||
set {
|
||||
if (value) FontStyle |= FontStyles.SmallCaps;
|
||||
else FontStyle &= ~FontStyles.SmallCaps;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Vertical {
|
||||
get => _vertical;
|
||||
set => _vertical = value;
|
||||
}
|
||||
|
||||
public float LineSpacing {
|
||||
get => _lineSpacing;
|
||||
set => _lineSpacing = value;
|
||||
}
|
||||
|
||||
public float CharSpacing {
|
||||
get => _charSpacing;
|
||||
set => _charSpacing = value;
|
||||
}
|
||||
|
||||
public DecalTextStyle(FontStyles fontStyle, bool vertical, float lineSpacing, float charSpacing) {
|
||||
_fontStyle = fontStyle;
|
||||
_vertical = vertical;
|
||||
_lineSpacing = lineSpacing;
|
||||
_charSpacing = charSpacing;
|
||||
}
|
||||
|
||||
public bool Equals(DecalTextStyle other) {
|
||||
return FontStyle == other.FontStyle && Vertical == other.Vertical &&
|
||||
Mathf.Approximately(LineSpacing, other.LineSpacing) &&
|
||||
Mathf.Approximately(CharSpacing, other.CharSpacing);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) {
|
||||
return obj is DecalTextStyle other && Equals(other);
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
unchecked {
|
||||
var hashCode = (int) FontStyle;
|
||||
hashCode = (hashCode * 397) ^ Vertical.GetHashCode();
|
||||
hashCode = (hashCode * 397) ^ LineSpacing.GetHashCode();
|
||||
hashCode = (hashCode * 397) ^ CharSpacing.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool operator ==(DecalTextStyle left, DecalTextStyle right) {
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
public static bool operator !=(DecalTextStyle left, DecalTextStyle right) {
|
||||
return !left.Equals(right);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue