Introduce proper support for non-shp sprites in cursors and ShpImageWidget.
This commit is contained in:
@@ -19,7 +19,9 @@ namespace OpenRA.Graphics
|
|||||||
public SpriteLoader(string[] exts, SheetBuilder sheetBuilder)
|
public SpriteLoader(string[] exts, SheetBuilder sheetBuilder)
|
||||||
{
|
{
|
||||||
SheetBuilder = sheetBuilder;
|
SheetBuilder = sheetBuilder;
|
||||||
this.exts = exts;
|
|
||||||
|
// Include extension-less version
|
||||||
|
this.exts = exts.Append("").ToArray();
|
||||||
sprites = new Cache<string, Sprite[]>(LoadSprites);
|
sprites = new Cache<string, Sprite[]>(LoadSprites);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace OpenRA
|
|||||||
ChromeMetrics.Initialize(Manifest.ChromeMetrics);
|
ChromeMetrics.Initialize(Manifest.ChromeMetrics);
|
||||||
ChromeProvider.Initialize(Manifest.Chrome);
|
ChromeProvider.Initialize(Manifest.Chrome);
|
||||||
SheetBuilder = new SheetBuilder(SheetType.Indexed);
|
SheetBuilder = new SheetBuilder(SheetType.Indexed);
|
||||||
SpriteLoader = new SpriteLoader(new string[] { ".shp" }, SheetBuilder);
|
SpriteLoader = new SpriteLoader(new string[0], SheetBuilder);
|
||||||
VoxelLoader = new VoxelLoader();
|
VoxelLoader = new VoxelLoader();
|
||||||
CursorProvider.Initialize(Manifest.Cursors);
|
CursorProvider.Initialize(Manifest.Cursors);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Cursors:
|
Cursors:
|
||||||
mouse2: cursor
|
mouse2.shp: cursor
|
||||||
scroll-t:
|
scroll-t:
|
||||||
start:1
|
start:1
|
||||||
scroll-tr:
|
scroll-tr:
|
||||||
@@ -114,7 +114,7 @@ Cursors:
|
|||||||
start:154
|
start:154
|
||||||
length:24
|
length:24
|
||||||
|
|
||||||
mouse4:cursor
|
mouse4.shp:cursor
|
||||||
move:
|
move:
|
||||||
start:0
|
start:0
|
||||||
length:8
|
length:8
|
||||||
@@ -125,7 +125,7 @@ Cursors:
|
|||||||
start:0
|
start:0
|
||||||
length: 8
|
length: 8
|
||||||
|
|
||||||
attackmove:cursor
|
attackmove.shp:cursor
|
||||||
attackmove:
|
attackmove:
|
||||||
start:0
|
start:0
|
||||||
length:8
|
length:8
|
||||||
@@ -138,7 +138,7 @@ Cursors:
|
|||||||
start:13
|
start:13
|
||||||
length:1
|
length:1
|
||||||
|
|
||||||
mouse3: cursor2
|
mouse3.shp: cursor2
|
||||||
enter-blocked:
|
enter-blocked:
|
||||||
start:212
|
start:212
|
||||||
length:1
|
length:1
|
||||||
@@ -170,7 +170,7 @@ Cursors:
|
|||||||
start:213
|
start:213
|
||||||
length:1
|
length:1
|
||||||
|
|
||||||
nopower: cursor
|
nopower.shp: cursor
|
||||||
powerdown-blocked:
|
powerdown-blocked:
|
||||||
start:0
|
start:0
|
||||||
length: 1
|
length: 1
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ ShadowIndex: 1
|
|||||||
|
|
||||||
Palettes:
|
Palettes:
|
||||||
cursor: cursor.pal
|
cursor: cursor.pal
|
||||||
mouse.r8: d2k.pal
|
mouse: d2k.pal
|
||||||
|
|
||||||
Cursors:
|
Cursors:
|
||||||
mouse.r8: mouse.r8
|
mouse.r8: mouse
|
||||||
scroll-t:
|
scroll-t:
|
||||||
start:112
|
start:112
|
||||||
x: 24
|
x: 24
|
||||||
@@ -252,7 +252,7 @@ Cursors:
|
|||||||
x: 24
|
x: 24
|
||||||
y: 24
|
y: 24
|
||||||
|
|
||||||
nopower: cursor
|
nopower.shp: cursor
|
||||||
powerdown-blocked:
|
powerdown-blocked:
|
||||||
start:0
|
start:0
|
||||||
length: 1
|
length: 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
cursor: cursor.pal
|
cursor: cursor.pal
|
||||||
|
|
||||||
Cursors:
|
Cursors:
|
||||||
mouse: cursor
|
mouse.shp: cursor
|
||||||
scroll-t:
|
scroll-t:
|
||||||
start:1
|
start:1
|
||||||
scroll-tr:
|
scroll-tr:
|
||||||
@@ -163,7 +163,7 @@ Cursors:
|
|||||||
start:148
|
start:148
|
||||||
length: 12
|
length: 12
|
||||||
|
|
||||||
nopower: cursor
|
nopower.shp: cursor
|
||||||
powerdown-blocked:
|
powerdown-blocked:
|
||||||
start:0
|
start:0
|
||||||
length: 1
|
length: 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
cursor: mousepal.pal
|
cursor: mousepal.pal
|
||||||
|
|
||||||
Cursors:
|
Cursors:
|
||||||
mouse: cursor
|
mouse.shp: cursor
|
||||||
scroll-t: #TODO
|
scroll-t: #TODO
|
||||||
start: 2
|
start: 2
|
||||||
scroll-tr: #TODO
|
scroll-tr: #TODO
|
||||||
|
|||||||
Reference in New Issue
Block a user