1
0
Fork 0

New hover and playing graphics on ship sprite

This commit is contained in:
Michaël Lemaire 2015-02-23 01:00:00 +01:00
parent 01877b8e37
commit fd5bb9b9b9
7 changed files with 167 additions and 21 deletions

View file

@ -98,17 +98,23 @@
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/temp.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:#43903f;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="m 160,632.36218 120,210 0,-130 z"
id="path3935"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:#4a6c48;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="m 280,842.36218 0,-130 230,-150 z"
id="path3937"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<g
id="g3939"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/temp.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3935"
d="m 160,632.36218 120,210 0,-130 z"
style="fill:#43903f;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3937"
d="m 280,842.36218 0,-130 230,-150 z"
style="fill:#4a6c48;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

142
graphics/ui/frames.svg Normal file
View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="frames.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="309.68086"
inkscape:cy="668.32729"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1920"
inkscape:window-height="1030"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid3776" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:none;stroke:#000000;stroke-width:11.506;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 123.4646,372.80142 0,171.17497 57.05832,57.05833 171.17498,0"
id="path3778"
inkscape:connector-curvature="0"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<use
x="0"
y="0"
xlink:href="#path3778"
id="use3780"
transform="matrix(-1,0,0,1,737.80216,0)"
width="744.09448"
height="1052.3622"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<use
x="0"
y="0"
xlink:href="#path3778"
id="use3782"
transform="matrix(1,0,0,-1,0,709.17617)"
width="744.09448"
height="1052.3622"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<use
x="0"
y="0"
xlink:href="#use3780"
id="use3784"
transform="matrix(1,0,0,-1,0,709.17617)"
width="744.09448"
height="1052.3622"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 339.09137,134.7189 60,0 -30,30 z"
id="path3786"
inkscape:connector-curvature="0"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<use
x="0"
y="0"
xlink:href="#path3786"
id="use3788"
transform="matrix(1,0,0,-1,0,708.5583)"
width="744.09448"
height="1052.3622"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<use
x="0"
y="0"
xlink:href="#use3788"
id="use3790"
transform="matrix(0,1,-1,0,724.34913,-15.46522)"
width="744.09448"
height="1052.3622"
inkscape:export-filename="/home/michael/workspace/spacetac/graphics/ui/use3803.png"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
<use
x="0"
y="0"
xlink:href="#use3790"
id="use3803"
transform="matrix(-1,0,0,1,738.21247,0)"
width="744.09448"
height="1052.3622"
inkscape:export-xdpi="11.47"
inkscape:export-ydpi="11.47" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 409 B

View file

@ -21,13 +21,6 @@ module SpaceTac.View {
super(battleview.game);
// Add hover effect
this.hover = new Phaser.Image(battleview.game, 0, 0, "battle-arena-shipspritehover", 0);
this.hover.scale.set(0.4, 0.4);
this.hover.anchor.set(0.5, 0.5);
this.hover.visible = false;
this.addChild(this.hover);
// Add ship sprite
this.sprite = new Phaser.Button(battleview.game, 0, 0, "ship-scout-sprite");
this.sprite.scale.set(0.1, 0.1);
@ -35,6 +28,12 @@ module SpaceTac.View {
this.sprite.anchor.set(0.5, 0.5);
this.addChild(this.sprite);
// Add hover effect
this.hover = new Phaser.Image(battleview.game, 0, 0, "battle-arena-shipspritehover", 0);
this.hover.anchor.set(0.5, 0.5);
this.hover.visible = false;
this.addChild(this.hover);
// Add playing effect
this.playing = new Phaser.Image(battleview.game, 0, 0, "battle-arena-shipspriteplaying", 0);
this.playing.anchor.set(0.5, 0.5);

View file

@ -54,9 +54,8 @@ module SpaceTac.View {
this.layer_enemy = new Phaser.Image(this.game, 0, 0, owned ? "battle-shiplist-own" : "battle-shiplist-enemy", 0);
this.addChild(this.layer_enemy);
this.layer_hover = new Phaser.Image(this.game, 8, 5, "battle-arena-shipspritehover", 0);
this.layer_hover = new Phaser.Image(this.game, 14, 14, "battle-arena-shipspritehover", 0);
this.layer_hover.visible = false;
this.layer_hover.scale.set(0.5, 0.5);
this.addChild(this.layer_hover);
this.hull = ValueBar.newStandard(list.battleview.game, 85, 28);