Added in-game options dialog
1
TODO
|
@ -31,6 +31,7 @@
|
|||
* Find incentives to move from starting position
|
||||
* Outcome: disable the loot button if there is no loot
|
||||
* Ensure that tweens and particle emitters get destroyed once animation is done (or view changes)
|
||||
* UI: add standard confirm dialog
|
||||
* Controls: do not focus on ship while targetting for area effects (dissociate hover and target)
|
||||
* Controls: fix hover being stuck when the cursor exits the window, or the item moves or is hidden
|
||||
* Drones: add hull points and take area damage
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
version="1.1"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
sodipodi:docname="battle.svg"
|
||||
inkscape:export-filename="/tmp/whole.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/background.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
style="enable-background:new">
|
||||
style="enable-background:new"
|
||||
enable-background="new">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
|
@ -1147,6 +1148,16 @@
|
|||
stdDeviation="0.68625"
|
||||
id="feGaussianBlur5349" />
|
||||
</filter>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter5171">
|
||||
<feBlend
|
||||
inkscape:collect="always"
|
||||
mode="lighten"
|
||||
in2="BackgroundImage"
|
||||
id="feBlend5173" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
|
@ -1155,11 +1166,11 @@
|
|||
borderopacity="1"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8"
|
||||
inkscape:cx="302.42634"
|
||||
inkscape:cy="1186.5897"
|
||||
inkscape:zoom="0.5"
|
||||
inkscape:cx="1132.2376"
|
||||
inkscape:cy="630.86578"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer19"
|
||||
inkscape:current-layer="layer25"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
showguides="false"
|
||||
|
@ -1170,7 +1181,7 @@
|
|||
inkscape:object-nodes="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:showpageshadow="false"
|
||||
showborder="true"
|
||||
borderlayer="true" />
|
||||
|
@ -2060,7 +2071,6 @@
|
|||
height="131.76981"
|
||||
x="0"
|
||||
y="-27.637838"
|
||||
transform="translate(0,27.637839)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
|
@ -2069,7 +2079,8 @@
|
|||
inkscape:tile-w="1920"
|
||||
inkscape:tile-h="131.76981"
|
||||
inkscape:tile-x0="0"
|
||||
inkscape:tile-y0="6.3635254e-07" />
|
||||
inkscape:tile-y0="6.3635254e-07"
|
||||
transform="translate(0,27.637839)" />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#linearGradient10012);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10.39999962;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect10004"
|
||||
|
@ -2082,40 +2093,6 @@
|
|||
d="M 11.379707,11.46429 H 144.37971 v 108.5 H 11.379707 Z"
|
||||
id="rect10022"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:#111e26;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.53807366px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter5649)"
|
||||
id="rect5917"
|
||||
width="75.571304"
|
||||
height="130.23174"
|
||||
x="1843.6595"
|
||||
y="0.76903749" />
|
||||
<g
|
||||
id="g5012"
|
||||
transform="translate(3.0467606,4.595854)">
|
||||
<rect
|
||||
y="43.359364"
|
||||
x="1860.2344"
|
||||
height="5.625"
|
||||
width="36.328125"
|
||||
id="rect5003"
|
||||
style="fill:#babad1;fill-opacity:1;fill-rule:evenodd;stroke:#b8c9ce;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.59148937" />
|
||||
<use
|
||||
transform="translate(0,15.117188)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5005"
|
||||
xlink:href="#rect5003"
|
||||
y="0"
|
||||
x="0" />
|
||||
<use
|
||||
transform="translate(0,30.234375)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5007"
|
||||
xlink:href="#rect5003"
|
||||
y="0"
|
||||
x="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g6122"
|
||||
transform="matrix(1.3001708,0,0,1.1990242,-12.304247,-205.15147)"
|
||||
|
@ -2176,6 +2153,74 @@
|
|||
id="flowPara6285" /></flowRoot> </g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer21"
|
||||
inkscape:label="Menu button"
|
||||
style="display:inline">
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer25"
|
||||
inkscape:label="Normal">
|
||||
<g
|
||||
style="display:inline;enable-background:new"
|
||||
id="g4998"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/button-menu1.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<rect
|
||||
y="0.76903749"
|
||||
x="1843.6595"
|
||||
height="130.23174"
|
||||
width="75.571304"
|
||||
id="rect5917"
|
||||
style="fill:#111e26;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.53807366px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter5649)" />
|
||||
<g
|
||||
transform="translate(3.0467606,4.595854)"
|
||||
id="g5012">
|
||||
<rect
|
||||
style="fill:#babad1;fill-opacity:1;fill-rule:evenodd;stroke:#b8c9ce;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.59148937"
|
||||
id="rect5003"
|
||||
width="36.328125"
|
||||
height="5.625"
|
||||
x="1860.2344"
|
||||
y="43.359364" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect5003"
|
||||
id="use5005"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(0,15.117188)" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect5003"
|
||||
id="use5007"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(0,30.234375)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer22"
|
||||
inkscape:label="Hover"
|
||||
style="display:inline;filter:url(#filter5171)">
|
||||
<rect
|
||||
style="opacity:1;fill:#1b3a4e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="rect5008"
|
||||
width="76.340454"
|
||||
height="131.76979"
|
||||
x="1843.6595"
|
||||
y="9.7751617e-06"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/battle/actionbar/button-menu1.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer6"
|
||||
|
@ -2631,7 +2676,7 @@
|
|||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:45px;line-height:23.4375px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#aaaaaa;fill-opacity:1;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-weight:normal;font-size:45px;line-height:23.4375px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#aaaaaa;fill-opacity:1;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="238.54517"
|
||||
y="-34.282837"
|
||||
id="text5105"><tspan
|
||||
|
@ -2639,7 +2684,7 @@
|
|||
id="tspan5103"
|
||||
x="238.54517"
|
||||
y="-34.282837"
|
||||
style="fill:#aaaaaa;stroke-width:0.9375px;fill-opacity:1;">2</tspan></text>
|
||||
style="fill:#aaaaaa;fill-opacity:1;stroke-width:0.9375px">2</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
|
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 131 KiB |
|
@ -845,10 +845,10 @@
|
|||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142136"
|
||||
inkscape:cx="338.69768"
|
||||
inkscape:cy="912.57657"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer2"
|
||||
inkscape:cx="1356.8733"
|
||||
inkscape:cy="814.09507"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:snap-bbox="true"
|
||||
|
@ -857,7 +857,7 @@
|
|||
showguides="false"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-object-midpoints="true">
|
||||
<sodipodi:guide
|
||||
position="0,0"
|
||||
|
@ -888,7 +888,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -1346,6 +1346,118 @@
|
|||
id="layer2"
|
||||
inkscape:label="Buttons"
|
||||
style="display:inline">
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Normal"
|
||||
style="display:inline">
|
||||
<g
|
||||
id="g5061"
|
||||
transform="translate(85.195844,18.256263)"
|
||||
style="display:inline;filter:url(#filter5500)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-in-hover.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<g
|
||||
id="g5106">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5014"
|
||||
d="M 322.38894,50.516359 309.83798,38.001483 V 17.06636 L 322.38894,4.5514861 334.9399,17.06636 v 20.935123 z"
|
||||
style="display:inline;fill:#3b526d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.69788879;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5073"
|
||||
d="m 311.05396,17.862411 v 19.457222 l 11.27207,11.272092"
|
||||
style="display:inline;fill:none;fill-rule:evenodd;stroke:#d2e1f3;stroke-width:0.5291667;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5035"
|
||||
d="m 320.50485,20.1814 v 5.469432 h -5.46843 v 3.767212 h 5.46843 v 5.4684 h 3.76718 v -5.4684 h 5.46942 v -3.767212 h -5.46942 V 20.1814 Z"
|
||||
style="display:inline;opacity:1;fill:#b8d2f1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.40000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
style="display:inline"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/tmp/temp.png"
|
||||
id="g4766"
|
||||
transform="rotate(-90,274.10252,151.75608)">
|
||||
<g
|
||||
id="g5998">
|
||||
<use
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-normal.png"
|
||||
transform="matrix(1,0,0,-1,85.195844,285.25563)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use4761"
|
||||
xlink:href="#g5106"
|
||||
y="0"
|
||||
x="0"
|
||||
style="display:inline;filter:url(#filter5500)" />
|
||||
<g
|
||||
id="g5012"
|
||||
transform="matrix(0,-0.28222223,0.28222223,0,390.28765,787.8475)"
|
||||
style="display:inline;enable-background:new">
|
||||
<rect
|
||||
y="43.359364"
|
||||
x="1860.2344"
|
||||
height="5.625"
|
||||
width="36.328125"
|
||||
id="rect5003"
|
||||
style="fill:#b8d2f1;fill-opacity:1;fill-rule:evenodd;stroke:#b8c9ce;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.59148937" />
|
||||
<use
|
||||
transform="translate(0,15.117188)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5005"
|
||||
xlink:href="#rect5003"
|
||||
y="0"
|
||||
x="0" />
|
||||
<use
|
||||
transform="translate(0,30.234375)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5007"
|
||||
xlink:href="#rect5003"
|
||||
y="0"
|
||||
x="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
style="display:inline"
|
||||
id="g5335"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-hover.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="translate(0,-4.2333336)">
|
||||
<use
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-normal.png"
|
||||
transform="matrix(1,0,0,-1,85.195844,285.25563)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5108"
|
||||
xlink:href="#g5106"
|
||||
y="0"
|
||||
x="0"
|
||||
style="display:inline;filter:url(#filter5500)" />
|
||||
<path
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-normal.png"
|
||||
id="path4531"
|
||||
d="m 414.93731,259.60541 v -3.76742 h -14.70506 v 3.76742 z"
|
||||
style="display:inline;opacity:1;fill:#b8d2f1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.50333309;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g4765">
|
||||
<g
|
||||
|
@ -1457,59 +1569,6 @@
|
|||
y="257.79318" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g5061"
|
||||
transform="translate(85.195845)"
|
||||
style="filter:url(#filter5500)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-in-hover.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<g
|
||||
id="g5106">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5014"
|
||||
d="M 322.38894,50.516359 309.83798,38.001483 V 17.06636 L 322.38894,4.5514861 334.9399,17.06636 v 20.935123 z"
|
||||
style="display:inline;fill:#3b526d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.69788879;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5073"
|
||||
d="m 311.05396,17.862411 v 19.457222 l 11.27207,11.272092"
|
||||
style="display:inline;fill:none;fill-rule:evenodd;stroke:#d2e1f3;stroke-width:0.5291667;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5035"
|
||||
d="m 320.50485,20.1814 v 5.469432 h -5.46843 v 3.767212 h 5.46843 v 5.4684 h 3.76718 v -5.4684 h 5.46942 v -3.767212 h -5.46942 V 20.1814 Z"
|
||||
style="display:inline;opacity:1;fill:#b8d2f1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.40000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g5335"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-hover.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<use
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-normal.png"
|
||||
transform="matrix(1,0,0,-1,85.195844,285.25563)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5108"
|
||||
xlink:href="#g5106"
|
||||
y="0"
|
||||
x="0"
|
||||
style="display:inline;filter:url(#filter5500)" />
|
||||
<path
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-normal.png"
|
||||
id="path4531"
|
||||
d="m 414.93731,259.60541 v -3.76742 h -14.70506 v 3.76742 z"
|
||||
style="display:inline;opacity:1;fill:#b8d2f1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.50333309;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g5181">
|
||||
<use
|
||||
|
@ -1612,12 +1671,12 @@
|
|||
inkscape:groupmode="layer"
|
||||
id="layer6"
|
||||
inkscape:label="Hover"
|
||||
style="display:none">
|
||||
style="display:inline">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5014-3"
|
||||
d="M 407.58478,50.516359 395.03382,38.001483 V 17.066359 L 407.58478,4.5514851 420.13574,17.066359 v 20.935124 z"
|
||||
d="M 407.58479,68.772624 395.03383,56.257748 V 35.322624 l 12.55096,-12.514874 12.55096,12.514874 v 20.935124 z"
|
||||
style="display:inline;fill:#93aac7;fill-opacity:0.57021281;fill-rule:evenodd;stroke:none;stroke-width:0.69788885;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5517)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-in-hover.png"
|
||||
inkscape:export-xdpi="96"
|
||||
|
@ -1629,7 +1688,7 @@
|
|||
id="use4855"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(4e-6,230.18779)"
|
||||
transform="translate(-5.6259523e-6,207.69819)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/map/zoom-out-hover.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
|
@ -1640,6 +1699,17 @@
|
|||
height="17.866964"
|
||||
x="32.366337"
|
||||
y="47.586124" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path5014-3"
|
||||
id="use6000"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="rotate(90,407.58466,18.273681)"
|
||||
inkscape:export-filename="/tmp/temp.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
|
|
Before Width: | Height: | Size: 375 KiB After Width: | Height: | Size: 378 KiB |
875
graphics/ui/options.svg
Normal file
|
@ -0,0 +1,875 @@
|
|||
<?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="1920"
|
||||
height="1080"
|
||||
viewBox="0 0 507.99999 285.75001"
|
||||
version="1.1"
|
||||
id="svg6044"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
sodipodi:docname="options.svg">
|
||||
<defs
|
||||
id="defs6038">
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Dialog shadow"
|
||||
id="filter7512">
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood7502" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite7504" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="33.649999999999999"
|
||||
result="blur"
|
||||
id="feGaussianBlur7506" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="offset"
|
||||
id="feOffset7508" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite7510" />
|
||||
</filter>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5286"
|
||||
id="radialGradient5288"
|
||||
cx="201.79222"
|
||||
cy="102.01662"
|
||||
fx="201.79222"
|
||||
fy="102.01662"
|
||||
r="136.00291"
|
||||
gradientTransform="matrix(0.93664447,0.03930088,-0.00452604,0.10786765,38.990702,35.962675)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient5286">
|
||||
<stop
|
||||
style="stop-color:#529aee;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5282" />
|
||||
<stop
|
||||
style="stop-color:#5a7aa0;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop5284" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientTransform="matrix(0.48299572,0,0,0.48299572,131.31908,-0.80979183)"
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5252"
|
||||
id="linearGradient5254"
|
||||
x1="259.38266"
|
||||
y1="143.13321"
|
||||
x2="259.57538"
|
||||
y2="95.291969"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient5252">
|
||||
<stop
|
||||
style="stop-color:#2d3135;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop5248" />
|
||||
<stop
|
||||
id="stop5256"
|
||||
offset="0.42624518"
|
||||
style="stop-color:#6e8ba1;stop-opacity:0.54901963" />
|
||||
<stop
|
||||
style="stop-color:#c4d7e5;stop-opacity:0"
|
||||
offset="1"
|
||||
id="stop5250" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5286"
|
||||
id="radialGradient10057"
|
||||
cx="201.79222"
|
||||
cy="102.01662"
|
||||
fx="201.79222"
|
||||
fy="102.01662"
|
||||
r="136.00291"
|
||||
gradientTransform="matrix(1.9392397,0.081369,-0.00937077,0.22333045,-191.15776,76.134141)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5252"
|
||||
id="linearGradient10065"
|
||||
x1="259.38266"
|
||||
y1="143.13321"
|
||||
x2="259.57538"
|
||||
y2="95.291969"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4665"
|
||||
inkscape:label="HNeon"
|
||||
height="3"
|
||||
y="-1">
|
||||
<feMorphology
|
||||
id="feMorphology4677"
|
||||
in="SourceGraphic"
|
||||
radius="1.2"
|
||||
result="result3" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="0.94999999999999996"
|
||||
id="feGaussianBlur4667"
|
||||
result="result1"
|
||||
in="SourceGraphic" />
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4669"
|
||||
operator="over"
|
||||
k1="-0.40000000000000002"
|
||||
k2="1.3600000000000001"
|
||||
k3="0.56000000000000005"
|
||||
k4="-0.23000000000000001"
|
||||
result="result2" />
|
||||
<feBlend
|
||||
mode="hard-light"
|
||||
in2="result3"
|
||||
id="feBlend4679" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4934"
|
||||
id="linearGradient4936"
|
||||
x1="480.44397"
|
||||
y1="4.0790515"
|
||||
x2="503.60327"
|
||||
y2="27.135599"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4934">
|
||||
<stop
|
||||
style="stop-color:#1d2831;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4930" />
|
||||
<stop
|
||||
id="stop4938"
|
||||
offset="0.10928228"
|
||||
style="stop-color:#4f585f;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#1d2831;stop-opacity:1"
|
||||
offset="0.35770971"
|
||||
id="stop4944" />
|
||||
<stop
|
||||
style="stop-color:#1d2831;stop-opacity:1"
|
||||
offset="0.64699304"
|
||||
id="stop4942" />
|
||||
<stop
|
||||
style="stop-color:#393f44;stop-opacity:1"
|
||||
offset="0.8964678"
|
||||
id="stop4940" />
|
||||
<stop
|
||||
style="stop-color:#1d2831;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4932" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter7193">
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(255,255,255)"
|
||||
result="flood"
|
||||
id="feFlood7183" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite7185" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="0.4"
|
||||
result="blur"
|
||||
id="feGaussianBlur7187" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="offset"
|
||||
id="feOffset7189" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite7191" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter5758">
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(255,255,255)"
|
||||
result="flood"
|
||||
id="feFlood5748" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite5750" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="0.4"
|
||||
result="blur"
|
||||
id="feGaussianBlur5752" />
|
||||
<feOffset
|
||||
dx="0"
|
||||
dy="0"
|
||||
result="offset"
|
||||
id="feOffset5754" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite5756" />
|
||||
</filter>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath5802">
|
||||
<path
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/background.png"
|
||||
style="display:inline;fill:#2c353d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7512);enable-background:new"
|
||||
d="M 475.82605,190.2261 H 1444.174 l -93.4957,699.5478 H 569.3217 Z"
|
||||
id="path5804"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
transform="matrix(0.34038154,0,0,0.34038154,19.662314,-53.825672)" />
|
||||
</clipPath>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4665-3"
|
||||
inkscape:label="HNeon"
|
||||
height="3"
|
||||
y="-1">
|
||||
<feMorphology
|
||||
id="feMorphology4677-6"
|
||||
in="SourceGraphic"
|
||||
radius="1.2"
|
||||
result="result3" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="0.94999999999999996"
|
||||
id="feGaussianBlur4667-7"
|
||||
result="result1"
|
||||
in="SourceGraphic" />
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4669-5"
|
||||
operator="over"
|
||||
result="result2" />
|
||||
<feBlend
|
||||
mode="hard-light"
|
||||
in2="result3"
|
||||
id="feBlend4679-3" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4618"
|
||||
inkscape:label="HNeon"
|
||||
height="3"
|
||||
y="-1">
|
||||
<feMorphology
|
||||
id="feMorphology4610"
|
||||
in="SourceGraphic"
|
||||
radius="1.2"
|
||||
result="result3" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="0.94999999999999996"
|
||||
id="feGaussianBlur4612"
|
||||
result="result1"
|
||||
in="SourceGraphic" />
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4614"
|
||||
operator="over"
|
||||
result="result2" />
|
||||
<feBlend
|
||||
mode="hard-light"
|
||||
in2="result3"
|
||||
id="feBlend4616" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4628"
|
||||
inkscape:label="HNeon"
|
||||
height="3"
|
||||
y="-1">
|
||||
<feMorphology
|
||||
id="feMorphology4620"
|
||||
in="SourceGraphic"
|
||||
radius="1.2"
|
||||
result="result3" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="0.94999999999999996"
|
||||
id="feGaussianBlur4622"
|
||||
result="result1"
|
||||
in="SourceGraphic" />
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4624"
|
||||
operator="over"
|
||||
result="result2" />
|
||||
<feBlend
|
||||
mode="hard-light"
|
||||
in2="result3"
|
||||
id="feBlend4626" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#000000"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.70000001"
|
||||
inkscape:cx="875.53821"
|
||||
inkscape:cy="617.34631"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer5"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
showborder="true"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<metadata
|
||||
id="metadata6041">
|
||||
<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 />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Background"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-11.249983)">
|
||||
<path
|
||||
transform="matrix(0.34038154,0,0,0.34038154,-72.766293,-29.681056)"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect4931"
|
||||
d="M 475.82605,190.2261 H 1444.174 l -93.4957,699.5478 H 569.3217 Z"
|
||||
style="display:inline;fill:#2c353d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7512);enable-background:new"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/background.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<g
|
||||
id="g4885"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/background.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5597"
|
||||
d="M 161.6566,35.143988 H 346.34339 L 328.51155,76.709487 H 179.48842 Z"
|
||||
style="display:inline;fill:#192026;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.09980018px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
|
||||
<text
|
||||
id="text4529"
|
||||
y="62.958092"
|
||||
x="187.69359"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.5361824px;line-height:3.1948154px;font-family:'Arial Black';-inkscape-font-specification:'Arial Black, ';letter-spacing:0px;word-spacing:0px;display:inline;fill:url(#radialGradient5288);fill-opacity:1;stroke:url(#linearGradient5254);stroke-width:0.46609086;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.5361824px;line-height:3.19260192px;font-family:'Arial Black';-inkscape-font-specification:'Arial Black, ';fill:url(#radialGradient5288);fill-opacity:1;stroke:url(#linearGradient5254);stroke-width:0.46609086;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
y="62.958092"
|
||||
x="187.69359"
|
||||
id="tspan4527"
|
||||
sodipodi:role="line">SpaceTac</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Toggles">
|
||||
<g
|
||||
id="g4897"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/background.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<g
|
||||
transform="translate(-0.66146395,-11.748125)"
|
||||
id="g5624">
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#366499;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 202.21727,106.87796 h 22.48958"
|
||||
id="path5618"
|
||||
inkscape:connector-curvature="0" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path5618"
|
||||
id="use5620"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(82.39881,11.339286)" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-1.1557989)"
|
||||
id="g5608">
|
||||
<circle
|
||||
style="fill:none;fill-rule:evenodd;stroke:#5398e9;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path5599"
|
||||
cx="128.02211"
|
||||
cy="100.79948"
|
||||
r="6.1471996" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path5599"
|
||||
id="use5601"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(254.26738,3.3764649e-6)" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#5398e9;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 134.43656,100.79948 H 376.31548"
|
||||
id="path5603"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g5595"
|
||||
transform="translate(55.793065,15.345835)">
|
||||
<g
|
||||
id="g5451"
|
||||
transform="translate(-29.633335,-11.249983)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/toggle1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<circle
|
||||
style="fill:#31465e;fill-opacity:1;fill-rule:evenodd;stroke:#858585;stroke-width:0.79374999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.42340429"
|
||||
id="path10135"
|
||||
cx="146.61314"
|
||||
cy="97.070984"
|
||||
r="19.318401"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/toggle1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<g
|
||||
id="g10133"
|
||||
transform="matrix(0.3526946,0,0,0.3526946,77.493197,56.672958)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/option1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect10114"
|
||||
transform="matrix(0.26458334,0,0,0.26458334,0,11.249983)"
|
||||
d="m 673.46289,340.89453 h -74.44336 v 98.99414 h 74.44336 l 99.70117,85.12695 V 255.76758 Z"
|
||||
style="fill:#5398e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10123"
|
||||
d="m 213.93453,94.971711 c 7.85398,8.485059 7.10721,26.695399 0,35.340779"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#5398e9;stroke-width:2.11666679;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<use
|
||||
transform="matrix(1.142619,0,0,1.142619,-25.619069,-16.064949)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use10125"
|
||||
xlink:href="#path10123"
|
||||
y="0"
|
||||
x="0" />
|
||||
<use
|
||||
transform="matrix(1.3137619,0,0,1.3137619,-56.361951,-35.342888)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use10127"
|
||||
xlink:href="#path10123"
|
||||
y="0"
|
||||
x="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(2.9111111,-11.249983)"
|
||||
id="g5443">
|
||||
<circle
|
||||
r="19.318401"
|
||||
cy="97.070984"
|
||||
cx="195.29582"
|
||||
id="circle10137"
|
||||
style="fill:#1e2630;fill-opacity:1;fill-rule:evenodd;stroke:#858585;stroke-width:0.79374999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.42340429"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/toggle2.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<g
|
||||
transform="translate(0.85776235,-0.31540361)"
|
||||
id="g10161"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/option2.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<g
|
||||
transform="translate(-0.26726953,-1.4699824)"
|
||||
id="g10147">
|
||||
<circle
|
||||
style="fill:#5398e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path10139"
|
||||
cx="188.09041"
|
||||
cy="106.73621"
|
||||
r="3.4490328" />
|
||||
<rect
|
||||
ry="0.83521724"
|
||||
style="fill:#5398e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="rect10143"
|
||||
width="1.6704345"
|
||||
height="17.038433"
|
||||
x="189.62773"
|
||||
y="90.868362" />
|
||||
</g>
|
||||
<use
|
||||
transform="translate(13.229842,-3.3408691)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use10149"
|
||||
xlink:href="#g10147"
|
||||
y="0"
|
||||
x="0" />
|
||||
<rect
|
||||
transform="rotate(-14.333748)"
|
||||
y="133.6702"
|
||||
x="161.22624"
|
||||
height="2.2232618"
|
||||
width="15.007017"
|
||||
id="rect10151"
|
||||
style="fill:#5398e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.19138408px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
ry="1.1116309" />
|
||||
<use
|
||||
transform="matrix(0.80327531,-0.0351618,0.02985045,0.6819371,37.37037,37.756077)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use10153"
|
||||
xlink:href="#rect10151"
|
||||
y="0"
|
||||
x="0" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g5459"
|
||||
transform="translate(37.041668,-11.249983)">
|
||||
<circle
|
||||
r="19.318401"
|
||||
cy="97.070984"
|
||||
cx="242.3924"
|
||||
id="circle4699"
|
||||
style="fill:#31465e;fill-opacity:1;fill-rule:evenodd;stroke:#c7daea;stroke-width:0.79374999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.84893613"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/toggle3.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<g
|
||||
transform="translate(-249.58397,81.463658)"
|
||||
style="display:inline"
|
||||
id="g4950"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/option3.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/button-fullscreen.png"
|
||||
y="3.9142845"
|
||||
x="480.28333"
|
||||
height="23.386084"
|
||||
width="23.386084"
|
||||
id="rect6016"
|
||||
style="display:inline;fill:url(#linearGradient4936);fill-opacity:1;fill-rule:evenodd;stroke:#5785bc;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<g
|
||||
transform="translate(-0.049883,0.03392527)"
|
||||
id="g4928">
|
||||
<path
|
||||
style="display:inline;fill:#4b8ad4;fill-opacity:1;fill-rule:evenodd;stroke:#6a8cb1;stroke-width:0.17;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 481.54179,5.0555342 h 5.20002 l -5.20002,5.2000148 z"
|
||||
id="rect6020"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/button-fullscreen.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect6020"
|
||||
id="use4924"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="rotate(180,492.02625,15.573401)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Menu"
|
||||
style="display:none">
|
||||
<g
|
||||
id="g5502"
|
||||
transform="translate(0,15.208351)">
|
||||
<text
|
||||
id="text11381"
|
||||
y="149.2113"
|
||||
x="203.21861"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.70000076px;line-height:6.61458349px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#5398e9;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#5398e9;fill-opacity:1;stroke-width:0.26458335px"
|
||||
y="149.2113"
|
||||
x="203.21861"
|
||||
id="tspan11379"
|
||||
sodipodi:role="line">Invite a friend</tspan></text>
|
||||
<g
|
||||
transform="translate(-3.5141942,0.48852915)"
|
||||
id="g11393"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/button1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="fill:#5398e9;fill-opacity:1;fill-rule:evenodd;stroke:#919191;stroke-width:0.79374999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.53829789;filter:url(#filter4665)"
|
||||
id="rect11385"
|
||||
width="125.88396"
|
||||
height="3.4745038"
|
||||
x="194.57222"
|
||||
y="128.88745"
|
||||
ry="1.0690815" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect11385"
|
||||
id="use11387"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(0,26.726953)" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g5507"
|
||||
transform="translate(0,15.208351)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/button2.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<g
|
||||
id="use4693"
|
||||
transform="translate(-3.5141942,53.405223)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/button2.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
ry="1.0690815"
|
||||
y="128.88745"
|
||||
x="194.57222"
|
||||
height="3.4745038"
|
||||
width="125.88396"
|
||||
id="rect5509"
|
||||
style="fill:#b4c9e0;fill-opacity:1;fill-rule:evenodd;stroke:#919191;stroke-width:0.79374999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.53829789;filter:url(#filter4665)" />
|
||||
<use
|
||||
transform="translate(0,26.726953)"
|
||||
height="100%"
|
||||
width="100%"
|
||||
id="use5511"
|
||||
xlink:href="#rect11385"
|
||||
y="0"
|
||||
x="0"
|
||||
style="fill:#b4c9e0;fill-opacity:1" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect5509"
|
||||
id="use5532"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(0,26.458344)" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.70000076px;line-height:6.61458349px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#5398e9;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="207.28038"
|
||||
y="201.29083"
|
||||
id="text4697"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4695"
|
||||
x="207.28038"
|
||||
y="201.29083"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#5398e9;fill-opacity:1;stroke-width:0.26458335px">Quit to menu</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer5"
|
||||
inkscape:label="Invite mode">
|
||||
<g
|
||||
style="display:inline"
|
||||
id="g5502-5"
|
||||
transform="translate(-8.7773574e-6,77.092964)">
|
||||
<text
|
||||
id="text11381-6"
|
||||
y="149.2113"
|
||||
x="230.48517"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.70000076px;line-height:6.61458349px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#5398e9;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#5398e9;fill-opacity:1;stroke-width:0.26458335px"
|
||||
y="149.2113"
|
||||
x="230.48517"
|
||||
id="tspan11379-2"
|
||||
sodipodi:role="line">Cancel</tspan></text>
|
||||
<g
|
||||
transform="translate(-3.5141942,0.48852915)"
|
||||
id="g11393-9"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/options/button1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<rect
|
||||
style="fill:#5398e9;fill-opacity:1;fill-rule:evenodd;stroke:#919191;stroke-width:0.79374999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.53829789;filter:url(#filter4665-3)"
|
||||
id="rect11385-1"
|
||||
width="125.88396"
|
||||
height="3.4745038"
|
||||
x="194.57222"
|
||||
y="128.88745"
|
||||
ry="1.0690815" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect11385-1"
|
||||
id="use11387-2"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="translate(0,26.726953)" />
|
||||
</g>
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:12.70000076px;line-height:6.61458349px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#5398e9;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="141.90141"
|
||||
y="145.14287"
|
||||
id="text4684"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4682"
|
||||
x="141.90141"
|
||||
y="145.14287"
|
||||
style="fill:#5398e9;fill-opacity:1;stroke-width:0.26458335px">Give this invite code to your friend:</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.70000076px;line-height:6.61458349px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#d6d6bd;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="231.69438"
|
||||
y="167.06541"
|
||||
id="text4690"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4688"
|
||||
x="231.69438"
|
||||
y="167.06541"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#d6d6bd;fill-opacity:1;stroke-width:0.26458335px">XT324</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:12.70000076px;line-height:6.61458349px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#b39256;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="168.8517"
|
||||
y="187.09822"
|
||||
id="text4694"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4692"
|
||||
x="168.8517"
|
||||
y="187.09822"
|
||||
style="fill:#b39256;fill-opacity:1;stroke-width:0.26458335px">Waiting for a connection ...</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="Close button"
|
||||
transform="translate(0,-11.249983)"
|
||||
style="display:inline">
|
||||
<g
|
||||
transform="translate(-92.428608,24.144616)"
|
||||
style="display:inline;opacity:1"
|
||||
id="g5454"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/common/dialog-close1.png"
|
||||
inkscape:export-xdpi="91.800003"
|
||||
inkscape:export-ydpi="91.800003"
|
||||
clip-path="url(#clipPath5802)">
|
||||
<circle
|
||||
r="20.847025"
|
||||
cy="11.249985"
|
||||
cx="508"
|
||||
id="path7854"
|
||||
style="fill:#151c22;fill-opacity:1;stroke:#c1c1c1;stroke-width:0.79374999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter7193)" />
|
||||
<text
|
||||
id="text7862"
|
||||
y="22.792192"
|
||||
x="496.83798"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.58333397px;line-height:6.61458349px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#d5c5ae;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7193)"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#d5c5ae;fill-opacity:1;stroke-width:0.26458335px"
|
||||
y="22.792192"
|
||||
x="496.83798"
|
||||
id="tspan7860"
|
||||
sodipodi:role="line">X</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(0,-11.249983)"
|
||||
inkscape:label="Close button hover"
|
||||
id="g5821"
|
||||
inkscape:groupmode="layer"
|
||||
style="display:none">
|
||||
<g
|
||||
clip-path="url(#clipPath5802)"
|
||||
inkscape:export-ydpi="91.800003"
|
||||
inkscape:export-xdpi="91.800003"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/common/dialog-close2.png"
|
||||
id="g5819"
|
||||
style="display:inline;opacity:1"
|
||||
transform="translate(-92.428608,24.144616)">
|
||||
<circle
|
||||
style="fill:#546472;fill-opacity:1;stroke:#c1c1c1;stroke-width:0.79374999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter7193)"
|
||||
id="circle5813"
|
||||
cx="508"
|
||||
cy="11.249985"
|
||||
r="20.847025" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.58333397px;line-height:6.61458349px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#d5c5ae;fill-opacity:1;stroke:none;stroke-width:0.26458335px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7193)"
|
||||
x="496.83798"
|
||||
y="22.792192"
|
||||
id="text5817"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5815"
|
||||
x="496.83798"
|
||||
y="22.792192"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#d5c5ae;fill-opacity:1;stroke-width:0.26458335px">X</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 34 KiB |
54
graphics/ui/template.svg
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="1920"
|
||||
height="1080"
|
||||
viewBox="0 0 507.99999 285.75001"
|
||||
version="1.1"
|
||||
id="svg6044"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
sodipodi:docname="template.svg">
|
||||
<defs
|
||||
id="defs6038" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#000000"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="707.14286"
|
||||
inkscape:cy="571.42857"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
showborder="true"
|
||||
inkscape:showpageshadow="false" />
|
||||
<metadata
|
||||
id="metadata6041">
|
||||
<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"
|
||||
transform="translate(0,-11.249983)" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
BIN
out/assets/images/battle/actionbar/background.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
out/assets/images/battle/actionbar/button-menu.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
out/assets/images/battle/actionbar/icon.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
out/assets/images/battle/actionbar/power.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1,009 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 406 B |
BIN
out/assets/images/common/dialog-close.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 25 KiB |
BIN
out/assets/images/map/buttons.png
Normal file
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 1.3 KiB |
BIN
out/assets/images/options/background.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
out/assets/images/options/button.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
out/assets/images/options/options.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
out/assets/images/options/toggle.png
Normal file
After Width: | Height: | Size: 20 KiB |
|
@ -13,6 +13,9 @@ module TS.SpaceTac {
|
|||
// Audio manager
|
||||
audio: UI.Audio;
|
||||
|
||||
// Game options
|
||||
options: UI.GameOptions;
|
||||
|
||||
// Storage used
|
||||
storage: Storage;
|
||||
|
||||
|
@ -25,7 +28,6 @@ module TS.SpaceTac {
|
|||
this.headless = headless;
|
||||
|
||||
this.audio = new UI.Audio(this);
|
||||
|
||||
this.storage = localStorage;
|
||||
|
||||
this.session = new GameSession();
|
||||
|
@ -53,6 +55,9 @@ module TS.SpaceTac {
|
|||
if (!this.headless) {
|
||||
this.plugins.add((<any>Phaser.Plugin).SceneGraph);
|
||||
}
|
||||
|
||||
this.audio = new UI.Audio(this);
|
||||
this.options = new UI.GameOptions(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,5 +138,27 @@ module TS.SpaceTac {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the game is currently fullscreen
|
||||
*/
|
||||
isFullscreen(): boolean {
|
||||
return this.scale.isFullScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle fullscreen mode.
|
||||
*
|
||||
* Returns true if the result is fullscreen
|
||||
*/
|
||||
toggleFullscreen(active: boolean | null = null): boolean {
|
||||
if (active === false || (active !== true && this.isFullscreen())) {
|
||||
this.scale.stopFullScreen();
|
||||
return false;
|
||||
} else {
|
||||
this.scale.startFullScreen(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,26 +4,29 @@ module TS.SpaceTac.UI {
|
|||
*/
|
||||
export class BaseView extends Phaser.State {
|
||||
// Link to the root UI
|
||||
gameui: MainUI;
|
||||
gameui: MainUI
|
||||
|
||||
// Message notifications
|
||||
messages: Messages;
|
||||
messages: Messages
|
||||
|
||||
// Input and key bindings
|
||||
inputs: InputManager;
|
||||
inputs: InputManager
|
||||
|
||||
// Animations
|
||||
animations: Animations;
|
||||
animations: Animations
|
||||
|
||||
// Timing
|
||||
timer: Timer;
|
||||
timer: Timer
|
||||
|
||||
// Tooltip
|
||||
tooltip_layer: Phaser.Group;
|
||||
tooltip: Tooltip;
|
||||
tooltip_layer: Phaser.Group
|
||||
tooltip: Tooltip
|
||||
|
||||
// Layers
|
||||
layers: Phaser.Group;
|
||||
layers: Phaser.Group
|
||||
|
||||
// Modal dialogs
|
||||
dialogs_layer: Phaser.Group
|
||||
|
||||
// Get the size of display
|
||||
getWidth(): number {
|
||||
|
@ -56,6 +59,7 @@ module TS.SpaceTac.UI {
|
|||
|
||||
// Layers
|
||||
this.layers = this.add.group(undefined, "View layers");
|
||||
this.dialogs_layer = this.add.group(undefined, "Dialogs layer");
|
||||
this.tooltip_layer = this.add.group(undefined, "Tooltip layer");
|
||||
this.tooltip = new Tooltip(this);
|
||||
this.messages = new Messages(this);
|
||||
|
@ -80,6 +84,14 @@ module TS.SpaceTac.UI {
|
|||
this.timer.cancelAll(true);
|
||||
}
|
||||
|
||||
get audio() {
|
||||
return this.gameui.audio;
|
||||
}
|
||||
|
||||
get options() {
|
||||
return this.gameui.options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Go back to the router state
|
||||
*/
|
||||
|
@ -123,20 +135,10 @@ module TS.SpaceTac.UI {
|
|||
}
|
||||
|
||||
/**
|
||||
* Toggle fullscreen mode.
|
||||
*
|
||||
* Returns true if the result is fullscreen
|
||||
* Open options dialog
|
||||
*/
|
||||
toggleFullscreen(active: boolean | null = null): boolean {
|
||||
if (active === false || (active !== true && this.game.scale.isFullScreen)) {
|
||||
this.scale.stopFullScreen();
|
||||
this.setStorage("fullscreen", "false");
|
||||
return false;
|
||||
} else {
|
||||
this.scale.startFullScreen(true);
|
||||
this.setStorage("fullscreen", "true");
|
||||
return true;
|
||||
}
|
||||
showOptions(): void {
|
||||
let dialog = new OptionsDialog(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,11 +11,6 @@ module TS.SpaceTac.UI {
|
|||
this.load.setPreloadSprite(this.preloadBar);
|
||||
|
||||
// Load images
|
||||
this.loadImage("menu/title.png");
|
||||
this.loadImage("menu/button.png");
|
||||
this.loadImage("menu/button-hover.png");
|
||||
this.loadImage("menu/button-fullscreen.png");
|
||||
this.loadImage("menu/load-bg.png");
|
||||
this.loadSheet("common/particles.png", 32);
|
||||
this.loadImage("common/transparent.png");
|
||||
this.loadImage("common/debug.png");
|
||||
|
@ -23,20 +18,22 @@ module TS.SpaceTac.UI {
|
|||
this.loadImage("common/arrow.png");
|
||||
this.loadImage("common/button-ok.png");
|
||||
this.loadImage("common/button-cancel.png");
|
||||
this.loadImage("battle/shiplist/background.png");
|
||||
this.loadImage("battle/shiplist/item-background.png");
|
||||
this.loadImage("battle/shiplist/damage.png");
|
||||
this.loadImage("battle/shiplist/hover.png");
|
||||
this.loadImage("battle/shiplist/info-button.png");
|
||||
this.loadSheet("common/dialog-close.png", 92, 82);
|
||||
this.loadImage("menu/title.png");
|
||||
this.loadImage("menu/button.png");
|
||||
this.loadImage("menu/button-hover.png");
|
||||
this.loadImage("menu/load-bg.png");
|
||||
this.loadImage("options/background.png");
|
||||
this.loadSheet("options/button.png", 497, 134);
|
||||
this.loadSheet("options/options.png", 128, 128);
|
||||
this.loadSheet("options/toggle.png", 149, 149);
|
||||
this.loadImage("battle/background.jpg");
|
||||
this.loadImage("battle/actionbar.png");
|
||||
this.loadImage("battle/action-inactive.png");
|
||||
this.loadImage("battle/action-active.png");
|
||||
this.loadImage("battle/action-selected.png");
|
||||
this.loadImage("battle/action-cooldown.png");
|
||||
this.loadImage("battle/power-available.png");
|
||||
this.loadImage("battle/power-using.png");
|
||||
this.loadImage("battle/power-used.png");
|
||||
this.loadImage("battle/actionbar/background.png");
|
||||
this.loadSheet("battle/actionbar/icon.png", 88, 88);
|
||||
this.loadSheet("battle/actionbar/power.png", 58, 21);
|
||||
this.loadImage("battle/actionbar/action-move.png");
|
||||
this.loadImage("battle/actionbar/action-endturn.png");
|
||||
this.loadSheet("battle/actionbar/button-menu.png", 79, 132);
|
||||
this.loadImage("battle/arena/background.png");
|
||||
this.loadImage("battle/arena/ap-indicator.png");
|
||||
this.loadImage("battle/arena/ship-normal-enemy.png");
|
||||
|
@ -53,8 +50,11 @@ module TS.SpaceTac.UI {
|
|||
this.loadImage("battle/arena/stasis.png");
|
||||
this.loadImage("battle/arena/target.png");
|
||||
this.loadImage("battle/arena/blast.png");
|
||||
this.loadImage("battle/actions/move.png");
|
||||
this.loadImage("battle/actions/endturn.png");
|
||||
this.loadImage("battle/shiplist/background.png");
|
||||
this.loadImage("battle/shiplist/item-background.png");
|
||||
this.loadImage("battle/shiplist/damage.png");
|
||||
this.loadImage("battle/shiplist/hover.png");
|
||||
this.loadImage("battle/shiplist/info-button.png");
|
||||
this.loadImage("battle/weapon/default.png");
|
||||
this.loadImage("battle/weapon/bullets.png");
|
||||
this.loadImage("battle/weapon/hot.png");
|
||||
|
@ -74,7 +74,7 @@ module TS.SpaceTac.UI {
|
|||
this.loadSheet("map/action.png", 323, 192);
|
||||
this.loadImage("map/orbit.png");
|
||||
this.loadImage("map/boundaries.png");
|
||||
this.loadSheet("map/button-zoom.png", 115, 191);
|
||||
this.loadSheet("map/buttons.png", 115, 191);
|
||||
this.loadImage("map/location-star.png");
|
||||
this.loadImage("map/location-planet.png");
|
||||
this.loadImage("map/location-warp.png");
|
||||
|
|
|
@ -114,4 +114,18 @@ module TS.SpaceTac.UI.Specs {
|
|||
let tnode = <Phaser.Text>node;
|
||||
expect(tnode.text).toEqual(content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that a layer contains the given component at a given index
|
||||
*/
|
||||
export function checkComponentInLayer(layer: Phaser.Group, index: number, component: UIComponent) {
|
||||
if (index >= layer.children.length) {
|
||||
fail(`Not enough children in group ${layer.name} for ${component} at index ${index}`);
|
||||
} else {
|
||||
let child = layer.children[index];
|
||||
if (child !== (<any>component).container) {
|
||||
fail(`${component} is not at index ${index} in ${layer.name}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,11 +105,11 @@ module TS.SpaceTac.UI.Specs {
|
|||
bar.power.children.forEach((child, idx) => {
|
||||
let img = <Phaser.Image>child;
|
||||
if (idx < available) {
|
||||
expect(img.name).toEqual("battle-power-available");
|
||||
expect(img.data.frame).toEqual(0);
|
||||
} else if (idx < available + using) {
|
||||
expect(img.name).toEqual("battle-power-using");
|
||||
expect(img.data.frame).toEqual(2);
|
||||
} else {
|
||||
expect(img.name).toEqual("battle-power-used");
|
||||
expect(img.data.frame).toEqual(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,21 +33,25 @@ module TS.SpaceTac.UI {
|
|||
battleview.layer_borders.add(this);
|
||||
|
||||
// Background
|
||||
this.addChild(new Phaser.Image(this.game, 0, 0, "battle-actionbar", 0));
|
||||
this.add(new Phaser.Image(this.game, 0, 0, "battle-actionbar-background", 0));
|
||||
|
||||
// Power bar
|
||||
this.power = this.game.add.group();
|
||||
this.addChild(this.power);
|
||||
this.add(this.power);
|
||||
|
||||
// Group for actions
|
||||
this.actions = new Phaser.Group(this.game);
|
||||
this.addChild(this.actions);
|
||||
this.add(this.actions);
|
||||
|
||||
// Waiting icon
|
||||
this.icon_waiting = new Phaser.Image(this.game, this.width / 2, 50, "common-waiting", 0);
|
||||
this.icon_waiting.anchor.set(0.5, 0.5);
|
||||
this.icon_waiting.scale.set(0.5, 0.5);
|
||||
this.addChild(this.icon_waiting);
|
||||
this.add(this.icon_waiting);
|
||||
|
||||
// Options button
|
||||
let button = battleview.add.button(1841, 0, "battle-actionbar-button-menu", () => battleview.showOptions(), null, 1, 0, 0, 1, this);
|
||||
battleview.tooltip.bindStaticText(button, "Game options");
|
||||
|
||||
// Key bindings
|
||||
battleview.inputs.bind("Escape", "Cancel action", () => this.actionEnded());
|
||||
|
@ -133,7 +137,7 @@ module TS.SpaceTac.UI {
|
|||
|
||||
// Add an action icon
|
||||
addAction(ship: Ship, action: BaseAction): ActionIcon {
|
||||
var icon = new ActionIcon(this, 192 + this.action_icons.length * 88, 8, ship, action, this.action_icons.length);
|
||||
var icon = new ActionIcon(this, 170 + this.action_icons.length * 88, 8, ship, action, this.action_icons.length);
|
||||
this.action_icons.push(icon);
|
||||
|
||||
return icon;
|
||||
|
@ -150,23 +154,23 @@ module TS.SpaceTac.UI {
|
|||
range(current_power - power_capacity).forEach(i => this.power.removeChildAt(current_power - 1 - i));
|
||||
//this.power.removeChildren(ship_power, current_power); // TODO bugged in phaser 2.6
|
||||
} else if (power_capacity > current_power) {
|
||||
range(power_capacity - current_power).forEach(i => this.game.add.image(190 + (current_power + i) * 56, 104, "battle-power-used", 0, this.power));
|
||||
range(power_capacity - current_power).forEach(i => this.game.add.image(192 + (current_power + i) * 56, 104, "battle-actionbar-power", 0, this.power));
|
||||
}
|
||||
|
||||
let power_value = this.ship_power_value;
|
||||
let remaining_power = power_value - selected_action;
|
||||
this.power.children.forEach((obj, idx) => {
|
||||
let img = <Phaser.Image>obj;
|
||||
let key: string;
|
||||
let frame: number;
|
||||
if (idx < remaining_power) {
|
||||
key = "battle-power-available";
|
||||
frame = 0;
|
||||
} else if (idx < power_value) {
|
||||
key = "battle-power-using";
|
||||
frame = 2;
|
||||
} else {
|
||||
key = "battle-power-used"
|
||||
frame = 1;
|
||||
}
|
||||
img.name = key;
|
||||
img.loadTexture(key);
|
||||
img.data.frame = frame;
|
||||
img.frame = frame;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ module TS.SpaceTac.UI {
|
|||
|
||||
// Create an icon for a single ship action
|
||||
constructor(bar: ActionBar, x: number, y: number, ship: Ship, action: BaseAction, position: number) {
|
||||
super(bar.game, x, y, "battle-action-inactive");
|
||||
super(bar.game, x, y, "battle-actionbar-icon");
|
||||
|
||||
this.bar = bar;
|
||||
this.battleview = bar.battleview;
|
||||
|
@ -51,27 +51,27 @@ module TS.SpaceTac.UI {
|
|||
|
||||
// Active layer
|
||||
this.active = false;
|
||||
this.layer_active = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-action-active", 0);
|
||||
this.layer_active = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-actionbar-icon", 1);
|
||||
this.layer_active.anchor.set(0.5, 0.5);
|
||||
this.layer_active.visible = false;
|
||||
this.addChild(this.layer_active);
|
||||
|
||||
// Selected layer
|
||||
this.selected = false;
|
||||
this.layer_selected = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-action-selected", 0);
|
||||
this.layer_selected = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-actionbar-icon", 2);
|
||||
this.layer_selected.anchor.set(0.5, 0.5);
|
||||
this.layer_selected.visible = false;
|
||||
this.addChild(this.layer_selected);
|
||||
|
||||
// Icon layer
|
||||
let icon = this.battleview.getImage(`battle-actions-${action.code}`, `equipment-${action.equipment ? action.equipment.code : "---"}`);
|
||||
let icon = this.battleview.getImage(`battle-actionbar-action-${action.code}`, `equipment-${action.equipment ? action.equipment.code : "---"}`);
|
||||
this.layer_icon = new Phaser.Image(this.game, this.width / 2, this.height / 2, icon, 0);
|
||||
this.layer_icon.anchor.set(0.5, 0.5);
|
||||
this.layer_icon.scale.set(0.25, 0.25);
|
||||
this.addChild(this.layer_icon);
|
||||
|
||||
// Cooldown layer
|
||||
this.cooldown = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-action-cooldown");
|
||||
this.cooldown = new Phaser.Image(this.game, this.width / 2, this.height / 2, "battle-actionbar-icon", 3);
|
||||
this.cooldown.anchor.set(0.5, 0.5);
|
||||
this.cooldown_count = new Phaser.Text(this.game, 0, 0, "", { align: "center", font: "36pt Arial", fill: "#aaaaaa" });
|
||||
this.cooldown_count.anchor.set(0.5, 0.5);
|
||||
|
|
|
@ -7,7 +7,7 @@ module TS.SpaceTac.UI {
|
|||
* Fill the tooltip
|
||||
*/
|
||||
static fill(filler: TooltipFiller, ship: Ship, action: BaseAction, position: number) {
|
||||
let icon = filler.view.getImage(`equipment-${action.equipment ? action.equipment.code : "---"}`, `battle-actions-${action.code}`);
|
||||
let icon = filler.view.getImage(`equipment-${action.equipment ? action.equipment.code : "---"}`, `battle-actionbar-action-${action.code}`);
|
||||
filler.addImage(0, 0, icon, 0.5);
|
||||
|
||||
filler.addText(150, 0, action.equipment ? action.equipment.name : action.name, "#ffffff", 24);
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
module TS.SpaceTac.UI {
|
||||
// Utility functions for sounds
|
||||
export class Audio {
|
||||
|
||||
private game: MainUI;
|
||||
|
||||
private music: Phaser.Sound | null;
|
||||
private game: MainUI
|
||||
private music: Phaser.Sound | null = null
|
||||
private music_volume = 1
|
||||
private music_playing_volume = 1
|
||||
|
||||
constructor(game: MainUI) {
|
||||
this.game = game;
|
||||
this.music = null;
|
||||
}
|
||||
|
||||
// Check if the sound system is up and running
|
||||
|
@ -31,7 +30,8 @@ module TS.SpaceTac.UI {
|
|||
this.stopMusic();
|
||||
}
|
||||
if (!this.music) {
|
||||
this.music = this.game.sound.play(key, volume, true);
|
||||
this.music_playing_volume = volume;
|
||||
this.music = this.game.sound.play(key, volume * this.music_volume, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,13 +46,41 @@ module TS.SpaceTac.UI {
|
|||
}
|
||||
}
|
||||
|
||||
// Toggle the mute status of the sound system
|
||||
toggleMute(): void {
|
||||
/**
|
||||
* Get the main volume (0-1)
|
||||
*/
|
||||
getMainVolume(): number {
|
||||
if (this.isActive()) {
|
||||
if (this.game.sound.volume > 0) {
|
||||
this.game.sound.volume = 0;
|
||||
} else {
|
||||
this.game.sound.volume = 1;
|
||||
return this.game.sound.volume;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the main volume (0-1)
|
||||
*/
|
||||
setMainVolume(value: number) {
|
||||
if (this.isActive()) {
|
||||
this.game.sound.volume = clamp(value, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the music volume (0-1)
|
||||
*/
|
||||
getMusicVolume(): number {
|
||||
return this.music_volume;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the music volume (0-1)
|
||||
*/
|
||||
setMusicVolume(value: number) {
|
||||
this.music_volume = value;
|
||||
if (this.isActive()) {
|
||||
if (this.music) {
|
||||
this.music.volume = value * this.music_playing_volume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,10 +36,10 @@ module TS.SpaceTac.UI {
|
|||
this.game.state.start("router");
|
||||
});
|
||||
this.bind("m", "Toggle sound", () => {
|
||||
this.game.audio.toggleMute();
|
||||
this.game.options.setNumberValue("mainvolume", this.game.options.getNumberValue("mainvolume") > 0 ? 0 : 1);
|
||||
});
|
||||
this.bind("f", "Toggle fullscreen", () => {
|
||||
view.toggleFullscreen();
|
||||
this.game.options.setBooleanValue("fullscreen", !this.game.options.getBooleanValue("fullscreen"));
|
||||
});
|
||||
this.bind("+", "", () => {
|
||||
if (this.cheats_allowed) {
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
module TS.SpaceTac.UI {
|
||||
export type UIInternalComponent = Phaser.Group | Phaser.Image | Phaser.Button | Phaser.Sprite;
|
||||
|
||||
export type UIImageInfo = string | { key: string, frame?: number, frame1?: number, frame2?: number };
|
||||
export type UITextInfo = { content: string, color: string, size: number, bold?: boolean };
|
||||
|
||||
function imageFromInfo(game: Phaser.Game, info: UIImageInfo): Phaser.Image {
|
||||
if (typeof info === "string") {
|
||||
info = { key: info };
|
||||
}
|
||||
let image = new Phaser.Image(game, 0, 0, info.key, info.frame);
|
||||
image.anchor.set(0.5, 0.5);
|
||||
return image;
|
||||
}
|
||||
|
||||
function textFromInfo(game: Phaser.Game, info: UITextInfo): Phaser.Text {
|
||||
let style = { font: `${info.bold ? "bold " : ""}${info.size}pt Arial`, fill: info.color };
|
||||
let text = new Phaser.Text(game, 0, 0, info.content, style);
|
||||
return text;
|
||||
}
|
||||
|
||||
function autoFromInfo(game: Phaser.Game, info: UIImageInfo | UITextInfo): Phaser.Text | Phaser.Image {
|
||||
if (info.hasOwnProperty("content")) {
|
||||
return textFromInfo(game, <UITextInfo>info);
|
||||
} else {
|
||||
return imageFromInfo(game, <UIImageInfo>info);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for UI components
|
||||
*/
|
||||
|
@ -39,6 +65,14 @@ module TS.SpaceTac.UI {
|
|||
return this.view.gameui;
|
||||
}
|
||||
|
||||
jasmineToString(): string {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return `<${classname(this)}>`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the a parent's layer
|
||||
*/
|
||||
|
@ -46,6 +80,13 @@ module TS.SpaceTac.UI {
|
|||
layer.add(this.container);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the component
|
||||
*/
|
||||
destroy(children = true) {
|
||||
this.container.destroy(children);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the internal phaser node
|
||||
*/
|
||||
|
@ -143,7 +184,7 @@ module TS.SpaceTac.UI {
|
|||
/**
|
||||
* Add a button in the component, positioning its center.
|
||||
*/
|
||||
addButton(x: number, y: number, on_click: Function, background: string, frame_normal = 0, frame_hover = frame_normal, tooltip = "", angle = 0) {
|
||||
addButton(x: number, y: number, on_click: Function, background: string, frame_normal = 0, frame_hover = 1, tooltip = "", angle = 0) {
|
||||
let button = new Phaser.Button(this.view.game, x, y, background, on_click, undefined, frame_hover, frame_normal);
|
||||
button.anchor.set(0.5, 0.5);
|
||||
button.angle = angle;
|
||||
|
@ -179,6 +220,40 @@ module TS.SpaceTac.UI {
|
|||
this.addInternalChild(image);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a 2-states toggle button.
|
||||
*
|
||||
* *background* should have three frames (toggled, untoggled and hovered).
|
||||
*
|
||||
* Returns a function to force the state of the button.
|
||||
*/
|
||||
addToggleButton(x: number, y: number, background: UIImageInfo, content: UIImageInfo | UITextInfo, on_change: (toggled: boolean) => void): (toggled: boolean) => void {
|
||||
let toggled = false;
|
||||
let toggle = (state: boolean, broadcast = false) => {
|
||||
toggled = state;
|
||||
if (typeof background !== "string") {
|
||||
image.frame = (toggled ? background.frame : background.frame1) || background.frame || 0;
|
||||
}
|
||||
contentobj.alpha = toggled ? 1 : 0.5;
|
||||
if (broadcast) {
|
||||
on_change(toggled);
|
||||
}
|
||||
};
|
||||
|
||||
let button = new Phaser.Button(this.container.game, x, y, "common-transparent", () => toggle(!toggled, true));
|
||||
|
||||
let image = imageFromInfo(this.game, background);
|
||||
let contentobj = autoFromInfo(this.game, content);
|
||||
|
||||
button.addChild(image);
|
||||
button.addChild(contentobj);
|
||||
this.addInternalChild(button);
|
||||
|
||||
toggle(toggled);
|
||||
|
||||
return toggle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the keyboard focus on this component.
|
||||
*/
|
||||
|
|
31
src/ui/common/UIDialog.spec.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
module TS.SpaceTac.UI.Specs {
|
||||
describe("UIDialog", () => {
|
||||
let testgame = setupEmptyView();
|
||||
|
||||
it("sets up an overlay", function () {
|
||||
let view = testgame.baseview;
|
||||
expect(view.dialogs_layer.children.length).toBe(0);
|
||||
|
||||
let dialog1 = new UIDialog(view, 10, 10, "fake");
|
||||
expect(view.dialogs_layer.children.length).toBe(2);
|
||||
expect(view.dialogs_layer.children[0] instanceof Phaser.Button).toBe(true);
|
||||
checkComponentInLayer(view.dialogs_layer, 1, dialog1);
|
||||
|
||||
let dialog2 = new UIDialog(view, 10, 10, "fake");
|
||||
expect(view.dialogs_layer.children.length).toBe(3);
|
||||
expect(view.dialogs_layer.children[0] instanceof Phaser.Button).toBe(true);
|
||||
checkComponentInLayer(view.dialogs_layer, 1, dialog1);
|
||||
checkComponentInLayer(view.dialogs_layer, 2, dialog2);
|
||||
|
||||
dialog1.close();
|
||||
|
||||
expect(view.dialogs_layer.children.length).toBe(2);
|
||||
expect(view.dialogs_layer.children[0] instanceof Phaser.Button).toBe(true);
|
||||
checkComponentInLayer(view.dialogs_layer, 1, dialog2);
|
||||
|
||||
dialog2.close();
|
||||
|
||||
expect(view.dialogs_layer.children.length).toBe(0);
|
||||
});
|
||||
});
|
||||
}
|
48
src/ui/common/UIDialog.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
/// <reference path="../common/UIComponent.ts" />
|
||||
|
||||
module TS.SpaceTac.UI {
|
||||
/**
|
||||
* Base class for modal dialogs
|
||||
*
|
||||
* When a modal dialog opens, an overlay is displayed behind it to prevent clicking through it
|
||||
*/
|
||||
export class UIDialog extends UIComponent {
|
||||
constructor(parent: BaseView, width: number, height: number, background: string) {
|
||||
super(parent, width, height, background);
|
||||
|
||||
if (parent.dialogs_layer.children.length == 0) {
|
||||
this.addOverlay(parent.dialogs_layer);
|
||||
}
|
||||
|
||||
this.moveToLayer(parent.dialogs_layer);
|
||||
this.setPositionInsideParent(0.5, 0.5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a control-capturing overlay
|
||||
*/
|
||||
addOverlay(layer: Phaser.Group): void {
|
||||
let overlay = layer.game.add.button(0, 0, "common-transparent", () => null);
|
||||
overlay.scale.set(this.view.getWidth() / overlay.width, this.view.getHeight() / overlay.height);
|
||||
layer.add(overlay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a close button
|
||||
*/
|
||||
addCloseButton(key: string, x: number, y: number, frame = 0, frame_hover = 1): void {
|
||||
this.addButton(x, y, () => this.close(), key, frame, frame_hover, "Close this dialog");
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the dialog, removing the overlay if needed
|
||||
*/
|
||||
close() {
|
||||
this.destroy();
|
||||
|
||||
if (this.view.dialogs_layer.children.length == 1) {
|
||||
this.view.dialogs_layer.removeAll(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -88,14 +88,19 @@ module TS.SpaceTac.UI {
|
|||
this.actions.setPosition(30, 30);
|
||||
this.actions.moveToLayer(this.layer_overlay);
|
||||
|
||||
this.zoom_in = new Phaser.Button(this.game, 1520, 100, "map-button-zoom", () => this.setZoom(this.zoom + 1), undefined, 1, 0);
|
||||
this.zoom_in = new Phaser.Button(this.game, 1540, 172, "map-buttons", () => this.setZoom(this.zoom + 1), undefined, 3, 0);
|
||||
this.zoom_in.anchor.set(0.5, 0.5);
|
||||
this.layer_overlay.add(this.zoom_in);
|
||||
this.tooltip.bindStaticText(this.zoom_in, "Zoom in");
|
||||
this.zoom_out = new Phaser.Button(this.game, 1520, 980, "map-button-zoom", () => this.setZoom(this.zoom - 1), undefined, 3, 2);
|
||||
this.zoom_out = new Phaser.Button(this.game, 1540, 958, "map-buttons", () => this.setZoom(this.zoom - 1), undefined, 4, 1);
|
||||
this.zoom_out.anchor.set(0.5, 0.5);
|
||||
this.layer_overlay.add(this.zoom_out);
|
||||
this.tooltip.bindStaticText(this.zoom_out, "Zoom out");
|
||||
let options = new Phaser.Button(this.game, 1436, 69, "map-buttons", () => this.showOptions(), undefined, 5, 2);
|
||||
options.angle = -90;
|
||||
options.anchor.set(0.5, 0.5);
|
||||
this.layer_overlay.add(options);
|
||||
this.tooltip.bindStaticText(options, "Game options");
|
||||
|
||||
this.character_sheet = new CharacterSheet(this, this.getWidth() - 307);
|
||||
this.character_sheet.show(this.player.fleet.ships[0], false);
|
||||
|
|
|
@ -36,7 +36,8 @@ module TS.SpaceTac.UI {
|
|||
this.button_quick_battle = this.addButton(1606, 674, "Quick Battle", "Play a single generated battle", () => this.onQuickBattle());
|
||||
|
||||
// Fullscreen button
|
||||
let button = new Phaser.Button(this.game, 1815, 15, "menu-button-fullscreen", () => this.toggleFullscreen());
|
||||
let button = new Phaser.Button(this.game, this.getWidth(), 0, "options-options", () => this.options.toggleBoolean("fullscreen"), null, 2, 2);
|
||||
button.anchor.set(1, 0);
|
||||
this.tooltip.bindStaticText(button, "Toggle full-screen");
|
||||
this.layer_title.add(button);
|
||||
|
||||
|
@ -65,13 +66,7 @@ module TS.SpaceTac.UI {
|
|||
}
|
||||
|
||||
addButton(x: number, y: number, caption: string, tooltip: string, callback: Function): Phaser.Button {
|
||||
var button = this.add.button(x - 20, y + 20, "menu-button", () => {
|
||||
let fullscreen = this.getStorage("fullscreen");
|
||||
if (fullscreen == "true") {
|
||||
this.toggleFullscreen(true);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
var button = this.add.button(x - 20, y + 20, "menu-button", callback);
|
||||
button.anchor.set(0.5, 0);
|
||||
button.input.useHandCursor = true;
|
||||
|
||||
|
|
98
src/ui/options/GameOptions.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
module TS.SpaceTac.UI {
|
||||
class GameOption<T> {
|
||||
code: string
|
||||
current: T
|
||||
getter: () => T
|
||||
setter: (value: T) => any
|
||||
|
||||
constructor(code: string, getter: () => T, setter: (value: T) => any) {
|
||||
this.code = code;
|
||||
this.getter = getter;
|
||||
this.setter = setter;
|
||||
this.current = getter();
|
||||
}
|
||||
|
||||
set(value: T) {
|
||||
this.setter(value);
|
||||
this.current = this.getter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Object to store and maintain game-wide options
|
||||
*
|
||||
* Options are kept on the browser storage when possible
|
||||
*/
|
||||
export class GameOptions {
|
||||
booleans: { [code: string]: GameOption<boolean> }
|
||||
numbers: { [code: string]: GameOption<number> }
|
||||
|
||||
constructor(parent: MainUI) {
|
||||
this.booleans = {
|
||||
fullscreen: new GameOption("fullscreen", () => parent.isFullscreen(), value => parent.toggleFullscreen(value)),
|
||||
}
|
||||
this.numbers = {
|
||||
mainvolume: new GameOption("mainvolume", () => parent.audio.getMainVolume(), value => parent.audio.setMainVolume(value)),
|
||||
musicvolume: new GameOption("musicvolume", () => parent.audio.getMusicVolume(), value => parent.audio.setMusicVolume(value)),
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current value of a boolean option
|
||||
*/
|
||||
getBooleanValue(code: string, default_value = false): boolean {
|
||||
let option = this.booleans[code];
|
||||
if (option) {
|
||||
return option.current;
|
||||
} else {
|
||||
return default_value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current value of a boolean option
|
||||
*/
|
||||
setBooleanValue(code: string, value: boolean): boolean {
|
||||
let option = this.booleans[code];
|
||||
if (option) {
|
||||
option.set(value);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle a boolean value between true and false
|
||||
*/
|
||||
toggleBoolean(code: string): boolean {
|
||||
this.setBooleanValue(code, !this.getBooleanValue(code));
|
||||
return this.getBooleanValue(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current value of a number option
|
||||
*/
|
||||
getNumberValue(code: string, default_value = 0): number {
|
||||
let option = this.numbers[code];
|
||||
if (option) {
|
||||
return option.current;
|
||||
} else {
|
||||
return default_value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current value of a number option
|
||||
*/
|
||||
setNumberValue(code: string, value: number): boolean {
|
||||
let option = this.numbers[code];
|
||||
if (option) {
|
||||
option.set(value);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
38
src/ui/options/OptionsDialog.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
/// <reference path="../common/UIDialog.ts" />
|
||||
|
||||
module TS.SpaceTac.UI {
|
||||
/**
|
||||
* Dialog to display game options
|
||||
*/
|
||||
export class OptionsDialog extends UIDialog {
|
||||
constructor(parent: BaseView) {
|
||||
super(parent, 1453, 1080, "options-background");
|
||||
|
||||
this.addCloseButton("common-dialog-close", 1304, 131, 0, 1);
|
||||
|
||||
let toggle = this.addToggleButton(415, 381,
|
||||
{ key: "options-toggle", frame: 0, frame1: 1, frame2: 2 },
|
||||
{ key: "options-options", frame: 0 },
|
||||
toggled => parent.options.setNumberValue("mainvolume", toggled ? 1 : 0));
|
||||
toggle(parent.options.getNumberValue("mainvolume") > 0);
|
||||
|
||||
toggle = this.addToggleButton(this.width / 2, 381,
|
||||
{ key: "options-toggle", frame: 0, frame1: 1, frame2: 2 },
|
||||
{ key: "options-options", frame: 1 },
|
||||
toggled => parent.options.setNumberValue("musicvolume", toggled ? 1 : 0));
|
||||
toggle(parent.options.getNumberValue("musicvolume") > 0);
|
||||
|
||||
toggle = this.addToggleButton(this.width - 415, 381,
|
||||
{ key: "options-toggle", frame: 0, frame1: 1, frame2: 2 },
|
||||
{ key: "options-options", frame: 2 },
|
||||
toggled => parent.options.setBooleanValue("fullscreen", toggled));
|
||||
toggle(parent.options.getBooleanValue("fullscreen"));
|
||||
|
||||
this.addButton(this.width / 2, 600, () => null, "options-button");
|
||||
this.addText(this.width / 2, 600, "Invite a friend", "#5398e9", 36, true, true);
|
||||
|
||||
this.addButton(this.width / 2, 800, () => parent.gameui.quitGame(), "options-button");
|
||||
this.addText(this.width / 2, 800, "Quit to menu", "#5398e9", 36, true, true);
|
||||
}
|
||||
}
|
||||
}
|