Introduce proper support for non-shp sprites in cursors and ShpImageWidget.

This commit is contained in:
Paul Chote
2013-11-30 00:52:22 +13:00
parent 01155a655a
commit f153516151
6 changed files with 15 additions and 13 deletions

View File

@@ -19,7 +19,9 @@ namespace OpenRA.Graphics
public SpriteLoader(string[] exts, SheetBuilder sheetBuilder)
{
SheetBuilder = sheetBuilder;
this.exts = exts;
// Include extension-less version
this.exts = exts.Append("").ToArray();
sprites = new Cache<string, Sprite[]>(LoadSprites);
}

View File

@@ -75,7 +75,7 @@ namespace OpenRA
ChromeMetrics.Initialize(Manifest.ChromeMetrics);
ChromeProvider.Initialize(Manifest.Chrome);
SheetBuilder = new SheetBuilder(SheetType.Indexed);
SpriteLoader = new SpriteLoader(new string[] { ".shp" }, SheetBuilder);
SpriteLoader = new SpriteLoader(new string[0], SheetBuilder);
VoxelLoader = new VoxelLoader();
CursorProvider.Initialize(Manifest.Cursors);
}

View File

@@ -4,7 +4,7 @@
Cursors:
mouse2: cursor
mouse2.shp: cursor
scroll-t:
start:1
scroll-tr:
@@ -114,7 +114,7 @@ Cursors:
start:154
length:24
mouse4:cursor
mouse4.shp:cursor
move:
start:0
length:8
@@ -125,7 +125,7 @@ Cursors:
start:0
length: 8
attackmove:cursor
attackmove.shp:cursor
attackmove:
start:0
length:8
@@ -138,7 +138,7 @@ Cursors:
start:13
length:1
mouse3: cursor2
mouse3.shp: cursor2
enter-blocked:
start:212
length:1
@@ -170,7 +170,7 @@ Cursors:
start:213
length:1
nopower: cursor
nopower.shp: cursor
powerdown-blocked:
start:0
length: 1

View File

@@ -2,10 +2,10 @@ ShadowIndex: 1
Palettes:
cursor: cursor.pal
mouse.r8: d2k.pal
mouse: d2k.pal
Cursors:
mouse.r8: mouse.r8
mouse.r8: mouse
scroll-t:
start:112
x: 24
@@ -252,7 +252,7 @@ Cursors:
x: 24
y: 24
nopower: cursor
nopower.shp: cursor
powerdown-blocked:
start:0
length: 1

View File

@@ -2,7 +2,7 @@
cursor: cursor.pal
Cursors:
mouse: cursor
mouse.shp: cursor
scroll-t:
start:1
scroll-tr:
@@ -163,7 +163,7 @@ Cursors:
start:148
length: 12
nopower: cursor
nopower.shp: cursor
powerdown-blocked:
start:0
length: 1

View File

@@ -2,7 +2,7 @@
cursor: mousepal.pal
Cursors:
mouse: cursor
mouse.shp: cursor
scroll-t: #TODO
start: 2
scroll-tr: #TODO