fixed powerdown/blocked cursors

This commit is contained in:
Chris Forbes
2010-01-27 22:09:30 +13:00
parent 059290e8de
commit 19fadc3e0a
6 changed files with 7 additions and 5 deletions

View File

@@ -31,8 +31,8 @@ namespace OpenRa.FileFormats
{ {
static void ReplicatePrevious( byte[] dest, int destIndex, int srcIndex, int count ) static void ReplicatePrevious( byte[] dest, int destIndex, int srcIndex, int count )
{ {
if( srcIndex >= destIndex ) if( srcIndex > destIndex )
throw new NotImplementedException( string.Format( "srcIndex >= destIndex {0} {1}", srcIndex, destIndex ) ); throw new NotImplementedException( string.Format( "srcIndex > destIndex {0} {1}", srcIndex, destIndex ) );
if( destIndex - srcIndex == 1 ) if( destIndex - srcIndex == 1 )
{ {

View File

@@ -35,5 +35,6 @@ namespace OpenRa
public static Cursor Repair { get { return new Cursor("repair"); } } public static Cursor Repair { get { return new Cursor("repair"); } }
public static Cursor RepairBlocked { get { return new Cursor("repair-blocked"); } } public static Cursor RepairBlocked { get { return new Cursor("repair-blocked"); } }
public static Cursor PowerDown { get { return new Cursor("powerdown"); } } public static Cursor PowerDown { get { return new Cursor("powerdown"); } }
public static Cursor PowerDownBlocked { get { return new Cursor("powerdown-blocked"); } }
} }
} }

View File

@@ -39,7 +39,7 @@ namespace OpenRa.Orders
{ {
mi.Button = MouseButton.Left; mi.Button = MouseButton.Left;
return OrderInner(world, xy, mi).Any() return OrderInner(world, xy, mi).Any()
? Cursor.PowerDown : Cursor.RepairBlocked; ? Cursor.PowerDown : Cursor.PowerDownBlocked;
} }
} }
} }

Binary file not shown.

View File

@@ -406,8 +406,9 @@
<sequence name="repair2-blocked" start="213" length="1" /> <sequence name="repair2-blocked" start="213" length="1" />
<sequence name="ability-minimap" start="214" length="8" /> <sequence name="ability-minimap" start="214" length="8" />
</cursor> </cursor>
<cursor src="speed"> <cursor src="nopower">
<sequence name="powerdown" start="3" length="12" /> <sequence name="powerdown-blocked" start="0" length="1" x="12" y="12" />
<sequence name="powerdown" start="1" length="3" x="12" y="12" />
</cursor> </cursor>
<unit name="powerdown"> <unit name="powerdown">
<sequence name="disabled" start="3" length="1" src="speed" /> <sequence name="disabled" start="3" length="1" src="speed" />

BIN
nopower.shp Normal file

Binary file not shown.