synced up VS project files again; reinstated callback refs in a way that gmcs won't bitch about
This commit is contained in:
@@ -60,6 +60,7 @@
|
|||||||
<Compile Include="Format40.cs" />
|
<Compile Include="Format40.cs" />
|
||||||
<Compile Include="Format80.cs" />
|
<Compile Include="Format80.cs" />
|
||||||
<Compile Include="Graphics\IGraphicsDevice.cs" />
|
<Compile Include="Graphics\IGraphicsDevice.cs" />
|
||||||
|
<Compile Include="Graphics\Vertex.cs" />
|
||||||
<Compile Include="IniFile.cs" />
|
<Compile Include="IniFile.cs" />
|
||||||
<Compile Include="int2.cs" />
|
<Compile Include="int2.cs" />
|
||||||
<Compile Include="IPaletteRemap.cs" />
|
<Compile Include="IPaletteRemap.cs" />
|
||||||
|
|||||||
@@ -89,11 +89,6 @@
|
|||||||
<Compile Include="Graphics\Minimap.cs" />
|
<Compile Include="Graphics\Minimap.cs" />
|
||||||
<Compile Include="Network\Connection.cs" />
|
<Compile Include="Network\Connection.cs" />
|
||||||
<Compile Include="Orders\PowerDownOrderGenerator.cs" />
|
<Compile Include="Orders\PowerDownOrderGenerator.cs" />
|
||||||
<Compile Include="Resources1.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Effects\Missile.cs" />
|
<Compile Include="Effects\Missile.cs" />
|
||||||
<Compile Include="Network\OrderIO.cs" />
|
<Compile Include="Network\OrderIO.cs" />
|
||||||
<Compile Include="Network\OrderManager.cs" />
|
<Compile Include="Network\OrderManager.cs" />
|
||||||
@@ -260,7 +255,6 @@
|
|||||||
<Compile Include="Traits\Util.cs" />
|
<Compile Include="Traits\Util.cs" />
|
||||||
<Compile Include="UiOverlay.cs" />
|
<Compile Include="UiOverlay.cs" />
|
||||||
<Compile Include="Graphics\Util.cs" />
|
<Compile Include="Graphics\Util.cs" />
|
||||||
<Compile Include="Graphics\Vertex.cs" />
|
|
||||||
<Compile Include="Graphics\Viewport.cs" />
|
<Compile Include="Graphics\Viewport.cs" />
|
||||||
<Compile Include="Orders\UnitOrderGenerator.cs" />
|
<Compile Include="Orders\UnitOrderGenerator.cs" />
|
||||||
<Compile Include="World.cs" />
|
<Compile Include="World.cs" />
|
||||||
@@ -292,12 +286,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="OpenRA.ico" />
|
<Content Include="OpenRA.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources1.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ namespace OpenRa.GlRenderer
|
|||||||
internal IntPtr cgContext;
|
internal IntPtr cgContext;
|
||||||
internal int vertexProfile, fragmentProfile;
|
internal int vertexProfile, fragmentProfile;
|
||||||
|
|
||||||
// readonly Glfw.GLFWmousebuttonfun mouseButtonCallback;
|
readonly Glfw.GLFWmousebuttonfun mouseButtonCallback;
|
||||||
// readonly Glfw.GLFWmouseposfun mousePositionCallback;
|
readonly Glfw.GLFWmouseposfun mousePositionCallback;
|
||||||
// readonly Glfw.GLFWwindowclosefun windowCloseCallback;
|
readonly Glfw.GLFWwindowclosefun windowCloseCallback;
|
||||||
int mouseX, mouseY;
|
int mouseX, mouseY;
|
||||||
|
|
||||||
public Size WindowSize { get { return windowSize; } }
|
public Size WindowSize { get { return windowSize; } }
|
||||||
@@ -64,7 +64,7 @@ namespace OpenRa.GlRenderer
|
|||||||
|
|
||||||
var lastButtonBits = (MouseButtons)0;
|
var lastButtonBits = (MouseButtons)0;
|
||||||
|
|
||||||
Glfw.glfwSetMouseButtonCallback( /*mouseButtonCallback =*/ ( button, action ) =>
|
mouseButtonCallback = ( button, action ) =>
|
||||||
{
|
{
|
||||||
var b = button == Glfw.GLFW_MOUSE_BUTTON_1 ? MouseButtons.Left
|
var b = button == Glfw.GLFW_MOUSE_BUTTON_1 ? MouseButtons.Left
|
||||||
: button == Glfw.GLFW_MOUSE_BUTTON_2 ? MouseButtons.Right
|
: button == Glfw.GLFW_MOUSE_BUTTON_2 ? MouseButtons.Right
|
||||||
@@ -78,20 +78,26 @@ namespace OpenRa.GlRenderer
|
|||||||
|
|
||||||
if (action != Glfw.GLFW_PRESS && action != Glfw.GLFW_RELEASE)
|
if (action != Glfw.GLFW_PRESS && action != Glfw.GLFW_RELEASE)
|
||||||
throw new InvalidOperationException();
|
throw new InvalidOperationException();
|
||||||
} );
|
};
|
||||||
Glfw.glfwSetMousePosCallback(/*mousePositionCallback = */(x, y) =>
|
|
||||||
|
mousePositionCallback = (x, y) =>
|
||||||
{
|
{
|
||||||
mouseX = x;
|
mouseX = x;
|
||||||
mouseY = y;
|
mouseY = y;
|
||||||
if (initDone)
|
if (initDone)
|
||||||
OpenRa.Game.DispatchMouseInput(MouseInputEvent.Move, new MouseEventArgs(lastButtonBits, 0, x, y, 0), 0);
|
OpenRa.Game.DispatchMouseInput(MouseInputEvent.Move, new MouseEventArgs(lastButtonBits, 0, x, y, 0), 0);
|
||||||
});
|
};
|
||||||
Glfw.glfwSetWindowCloseCallback(/* windowCloseCallback = */() =>
|
windowCloseCallback = () =>
|
||||||
{
|
{
|
||||||
OpenRa.Game.Exit();
|
OpenRa.Game.Exit();
|
||||||
Glfw.glfwIconifyWindow();
|
Glfw.glfwIconifyWindow();
|
||||||
return Gl.GL_TRUE;
|
return Gl.GL_TRUE;
|
||||||
} );
|
};
|
||||||
|
|
||||||
|
Glfw.glfwSetMouseButtonCallback( mouseButtonCallback );
|
||||||
|
Glfw.glfwSetMousePosCallback( mousePositionCallback );
|
||||||
|
Glfw.glfwSetWindowCloseCallback( windowCloseCallback );
|
||||||
|
|
||||||
CheckGlError();
|
CheckGlError();
|
||||||
|
|
||||||
Glfw.glfwGetWindowSize(out width, out height);
|
Glfw.glfwGetWindowSize(out width, out height);
|
||||||
|
|||||||
Reference in New Issue
Block a user