Revision | 5632f52ade6280b5f09a8f783373b4b95046c918 (tree) |
---|---|
Time | 2007-03-28 04:27:12 |
Author | smirlreverend |
Commiter | smirlreverend |
[svn r22] Ported my GDI+ Example from ShuttleVB to C# and Added to DrawHUD in ShuttlePBdotNET.dll
Changed the output directory for StockVessels to /Modules/DotNET instead of /bin/Debug
Changed the output directory for Interfaces and Wrapper to the Orbiter Root folder. This relieves the need to add those Assemblies to the GAC, allowing plugins to be distributed as Zip files without the need for an installer).
@@ -18,7 +18,7 @@ | ||
18 | 18 | <DebugSymbols>true</DebugSymbols> |
19 | 19 | <DebugType>full</DebugType> |
20 | 20 | <Optimize>false</Optimize> |
21 | - <OutputPath>bin\Debug\</OutputPath> | |
21 | + <OutputPath>..\..\..\..\</OutputPath> | |
22 | 22 | <DefineConstants>DEBUG;TRACE</DefineConstants> |
23 | 23 | <ErrorReport>prompt</ErrorReport> |
24 | 24 | <WarningLevel>4</WarningLevel> |
@@ -17,11 +17,11 @@ | ||
17 | 17 | <DebugSymbols>true</DebugSymbols> |
18 | 18 | <DebugType>full</DebugType> |
19 | 19 | <Optimize>false</Optimize> |
20 | - <OutputPath>bin\Debug\</OutputPath> | |
20 | + <OutputPath>..\..\..\..\Modules\DotNet\</OutputPath> | |
21 | 21 | <DefineConstants>DEBUG;TRACE</DefineConstants> |
22 | 22 | <ErrorReport>prompt</ErrorReport> |
23 | 23 | <WarningLevel>4</WarningLevel> |
24 | - <DocumentationFile>Orbiter.StockVessels.xml</DocumentationFile> | |
24 | + <DocumentationFile>bin\Debug\Orbiter.StockVessels.XML</DocumentationFile> | |
25 | 25 | </PropertyGroup> |
26 | 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
27 | 27 | <DebugType>pdbonly</DebugType> |
@@ -1,11 +1,12 @@ | ||
1 | 1 | using System; |
2 | +using System.Drawing; | |
2 | 3 | using Orbiter.Interfaces; |
3 | 4 | |
4 | 5 | namespace Orbiter.StockVessels |
5 | 6 | { |
6 | 7 | public class ShuttlePB:Vessel2 |
7 | 8 | { |
8 | - private const Vessel2Callback callbacks=Vessel2Callback.SetClassCaps; | |
9 | + private const Vessel2Callback callbacks=Vessel2Callback.SetClassCaps | Vessel2Callback.DrawHUD; | |
9 | 10 | private const double fuelMass = 750.0; |
10 | 11 | private const double isp = 5e4; |
11 | 12 | private const double maximumMainThrust = 3e4; |
@@ -222,7 +223,11 @@ | ||
222 | 223 | |
223 | 224 | public void DrawHUD(int mode, HudPaintSpecification hps, IntPtr hDC) |
224 | 225 | { |
225 | - throw new NotImplementedException(); | |
226 | + Graphics MyHUD = Graphics.FromHdc(hDC); | |
227 | + Font MyFont = new Font("Arial", 10.0F, FontStyle.Regular, GraphicsUnit.Pixel, (byte)(0)); | |
228 | + Brush MyBrush = Brushes.Red; | |
229 | + MyHUD.DrawString(".NET Graphics Test (GDI+)", MyFont, MyBrush, 10, 250); | |
230 | + Base.DrawHUD(mode, hps, hDC); | |
226 | 231 | } |
227 | 232 | |
228 | 233 | public void RCSMode(int mode) |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | 2 | <VisualStudioProject |
3 | 3 | ProjectType="Visual C++" |
4 | - Version="8,00" | |
4 | + Version="8.00" | |
5 | 5 | Name="Orbiter.Wrapper" |
6 | 6 | ProjectGUID="{326F9CD9-06DC-4749-999C-CDCC8C50042A}" |
7 | 7 | RootNamespace="Orbiter.Wrapper" |
@@ -64,7 +64,7 @@ | ||
64 | 64 | <Tool |
65 | 65 | Name="VCLinkerTool" |
66 | 66 | AdditionalDependencies="orbitersdk.lib orbiter.lib" |
67 | - OutputFile="bin\Debug\Orbiter.Wrapper.dll" | |
67 | + OutputFile="..\..\..\..\Orbiter.Wrapper.dll" | |
68 | 68 | Version="1.0.0.0" |
69 | 69 | LinkIncremental="1" |
70 | 70 | AdditionalLibraryDirectories="..\..\..\lib" |