HighDPI actions UI icons.

This commit is contained in:
Pieter-Jan Briers
2021-01-24 02:31:38 +01:00
parent 12b442d2ee
commit 3874f1f77a
19 changed files with 213 additions and 15 deletions

View File

@@ -122,23 +122,25 @@ namespace Content.Client.UserInterface
hotbarContainer.AddChild(settingsContainer); hotbarContainer.AddChild(settingsContainer);
settingsContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 }); settingsContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 });
_lockTexture = resourceCache.GetTexture("/Textures/Interface/Nano/lock.svg.png"); _lockTexture = resourceCache.GetTexture("/Textures/Interface/Nano/lock.svg.192dpi.png");
_unlockTexture = resourceCache.GetTexture("/Textures/Interface/Nano/lock_open.svg.png"); _unlockTexture = resourceCache.GetTexture("/Textures/Interface/Nano/lock_open.svg.192dpi.png");
_lockButton = new TextureButton _lockButton = new TextureButton
{ {
TextureNormal = _unlockTexture, TextureNormal = _unlockTexture,
SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
SizeFlagsVertical = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter,
SizeFlagsStretchRatio = 1 SizeFlagsStretchRatio = 1,
Scale = (0.5f, 0.5f)
}; };
settingsContainer.AddChild(_lockButton); settingsContainer.AddChild(_lockButton);
settingsContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 2 }); settingsContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 2 });
_settingsButton = new TextureButton _settingsButton = new TextureButton
{ {
TextureNormal = resourceCache.GetTexture("/Textures/Interface/Nano/gear.svg.png"), TextureNormal = resourceCache.GetTexture("/Textures/Interface/Nano/gear.svg.192dpi.png"),
SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
SizeFlagsVertical = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter,
SizeFlagsStretchRatio = 1 SizeFlagsStretchRatio = 1,
Scale = (0.5f, 0.5f)
}; };
settingsContainer.AddChild(_settingsButton); settingsContainer.AddChild(_settingsButton);
settingsContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 }); settingsContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 });
@@ -160,10 +162,11 @@ namespace Content.Client.UserInterface
_loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 }); _loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 });
var previousHotbarIcon = new TextureRect() var previousHotbarIcon = new TextureRect()
{ {
Texture = resourceCache.GetTexture("/Textures/Interface/Nano/left_arrow.svg.png"), Texture = resourceCache.GetTexture("/Textures/Interface/Nano/left_arrow.svg.192dpi.png"),
SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
SizeFlagsVertical = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter,
SizeFlagsStretchRatio = 1 SizeFlagsStretchRatio = 1,
TextureScale = (0.5f, 0.5f)
}; };
_loadoutContainer.AddChild(previousHotbarIcon); _loadoutContainer.AddChild(previousHotbarIcon);
_loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 2 }); _loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 2 });
@@ -176,10 +179,11 @@ namespace Content.Client.UserInterface
_loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 2 }); _loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 2 });
var nextHotbarIcon = new TextureRect var nextHotbarIcon = new TextureRect
{ {
Texture = resourceCache.GetTexture("/Textures/Interface/Nano/right_arrow.svg.png"), Texture = resourceCache.GetTexture("/Textures/Interface/Nano/right_arrow.svg.192dpi.png"),
SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
SizeFlagsVertical = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter,
SizeFlagsStretchRatio = 1 SizeFlagsStretchRatio = 1,
TextureScale = (0.5f, 0.5f)
}; };
_loadoutContainer.AddChild(nextHotbarIcon); _loadoutContainer.AddChild(nextHotbarIcon);
_loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 }); _loadoutContainer.AddChild(new Control { SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsStretchRatio = 1 });

View File

@@ -1,3 +1,58 @@
<svg width="18" height="17" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path d="M17.5801 8.00809C17.6165 8.3271 17.6348 8.64611 17.6348 8.96512C17.6348 9.29324 17.6165 9.61681 17.5801 9.93582L15.8301 10.2913C15.7298 10.8108 15.5658 11.3167 15.3379 11.8089L16.5 13.0667C16.1628 13.6318 15.7572 14.1513 15.2832 14.6253L13.793 13.9417C13.401 14.3063 12.9727 14.6162 12.5078 14.8714L12.6855 16.4026C12.0566 16.6761 11.4049 16.872 10.7305 16.9905L10.0059 15.6917C9.73242 15.7281 9.46354 15.7464 9.19922 15.7464C8.9349 15.7464 8.67057 15.7281 8.40625 15.6917L7.66797 16.9905C6.99349 16.872 6.3418 16.6761 5.71289 16.4026L5.89062 14.8714C5.42578 14.6162 4.9974 14.3063 4.60547 13.9417L3.11523 14.6253C2.64128 14.1513 2.23568 13.6318 1.89844 13.0667L3.04688 11.8089C2.82812 11.3167 2.66406 10.8108 2.55469 10.2913L0.818359 9.93582C0.772786 9.61681 0.75 9.29324 0.75 8.96512C0.75 8.64611 0.772786 8.3271 0.818359 8.00809L2.55469 7.65262C2.66406 7.12397 2.82812 6.61811 3.04688 6.13504L1.89844 4.87723C2.23568 4.31212 2.64128 3.79259 3.11523 3.31863L4.60547 4.00223C4.9974 3.63764 5.42578 3.32775 5.89062 3.07254L5.71289 1.54129C6.3418 1.26785 6.99349 1.07189 7.66797 0.9534L8.40625 2.25223C8.67057 2.21577 8.9349 2.19754 9.19922 2.19754C9.46354 2.19754 9.73242 2.21577 10.0059 2.25223L10.7305 0.9534C11.4049 1.07189 12.0566 1.26785 12.6855 1.54129L12.5078 3.07254C12.9727 3.32775 13.4056 3.63764 13.8066 4.00223L15.2832 3.31863C15.7572 3.79259 16.1628 4.31212 16.5 4.87723L15.3516 6.13504C15.5703 6.61811 15.7298 7.12397 15.8301 7.65262L17.5801 8.00809ZM12.6445 12.4104C13.6016 11.4625 14.0801 10.3141 14.0801 8.96512C14.0801 7.62527 13.6016 6.47684 12.6445 5.51981C11.6875 4.57189 10.5345 4.09793 9.18555 4.09793C7.8457 4.09793 6.70182 4.57189 5.75391 5.51981C4.80599 6.47684 4.33203 7.62527 4.33203 8.96512C4.33203 10.3141 4.80599 11.4625 5.75391 12.4104C6.70182 13.3675 7.8457 13.846 9.18555 13.846C10.5345 13.846 11.6875 13.3675 12.6445 12.4104ZM10.4707 10.2503C10.1243 10.6057 9.70052 10.7835 9.19922 10.7835C8.69792 10.7835 8.26953 10.6057 7.91406 10.2503C7.56771 9.89481 7.39453 9.46642 7.39453 8.96512C7.39453 8.47293 7.56771 8.0491 7.91406 7.69363C8.26953 7.33817 8.69792 7.16043 9.19922 7.16043C9.70052 7.16043 10.1243 7.33817 10.4707 7.69363C10.8262 8.0491 11.0039 8.47293 11.0039 8.96512C11.0039 9.46642 10.8262 9.89481 10.4707 10.2503Z" fill="#7D80A0"/> <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="18"
height="17"
viewBox="0 0 18 17"
fill="none"
version="1.1"
id="svg4"
sodipodi:docname="gear.svg"
inkscape:export-filename="C:\Users\Pieter-Jan Briers\Projects\space-station-14\Resources\Textures\Interface\Nano\gear.svg.192dpi.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1051"
id="namedview6"
showgrid="false"
inkscape:zoom="36.603175"
inkscape:cx="9.269654"
inkscape:cy="8.4006021"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M17.5801 8.00809C17.6165 8.3271 17.6348 8.64611 17.6348 8.96512C17.6348 9.29324 17.6165 9.61681 17.5801 9.93582L15.8301 10.2913C15.7298 10.8108 15.5658 11.3167 15.3379 11.8089L16.5 13.0667C16.1628 13.6318 15.7572 14.1513 15.2832 14.6253L13.793 13.9417C13.401 14.3063 12.9727 14.6162 12.5078 14.8714L12.6855 16.4026C12.0566 16.6761 11.4049 16.872 10.7305 16.9905L10.0059 15.6917C9.73242 15.7281 9.46354 15.7464 9.19922 15.7464C8.9349 15.7464 8.67057 15.7281 8.40625 15.6917L7.66797 16.9905C6.99349 16.872 6.3418 16.6761 5.71289 16.4026L5.89062 14.8714C5.42578 14.6162 4.9974 14.3063 4.60547 13.9417L3.11523 14.6253C2.64128 14.1513 2.23568 13.6318 1.89844 13.0667L3.04688 11.8089C2.82812 11.3167 2.66406 10.8108 2.55469 10.2913L0.818359 9.93582C0.772786 9.61681 0.75 9.29324 0.75 8.96512C0.75 8.64611 0.772786 8.3271 0.818359 8.00809L2.55469 7.65262C2.66406 7.12397 2.82812 6.61811 3.04688 6.13504L1.89844 4.87723C2.23568 4.31212 2.64128 3.79259 3.11523 3.31863L4.60547 4.00223C4.9974 3.63764 5.42578 3.32775 5.89062 3.07254L5.71289 1.54129C6.3418 1.26785 6.99349 1.07189 7.66797 0.9534L8.40625 2.25223C8.67057 2.21577 8.9349 2.19754 9.19922 2.19754C9.46354 2.19754 9.73242 2.21577 10.0059 2.25223L10.7305 0.9534C11.4049 1.07189 12.0566 1.26785 12.6855 1.54129L12.5078 3.07254C12.9727 3.32775 13.4056 3.63764 13.8066 4.00223L15.2832 3.31863C15.7572 3.79259 16.1628 4.31212 16.5 4.87723L15.3516 6.13504C15.5703 6.61811 15.7298 7.12397 15.8301 7.65262L17.5801 8.00809ZM12.6445 12.4104C13.6016 11.4625 14.0801 10.3141 14.0801 8.96512C14.0801 7.62527 13.6016 6.47684 12.6445 5.51981C11.6875 4.57189 10.5345 4.09793 9.18555 4.09793C7.8457 4.09793 6.70182 4.57189 5.75391 5.51981C4.80599 6.47684 4.33203 7.62527 4.33203 8.96512C4.33203 10.3141 4.80599 11.4625 5.75391 12.4104C6.70182 13.3675 7.8457 13.846 9.18555 13.846C10.5345 13.846 11.6875 13.3675 12.6445 12.4104ZM10.4707 10.2503C10.1243 10.6057 9.70052 10.7835 9.19922 10.7835C8.69792 10.7835 8.26953 10.6057 7.91406 10.2503C7.56771 9.89481 7.39453 9.46642 7.39453 8.96512C7.39453 8.47293 7.56771 8.0491 7.91406 7.69363C8.26953 7.33817 8.69792 7.16043 9.19922 7.16043C9.70052 7.16043 10.1243 7.33817 10.4707 7.69363C10.8262 8.0491 11.0039 8.47293 11.0039 8.96512C11.0039 9.46642 10.8262 9.89481 10.4707 10.2503Z"
fill="#7D80A0"
id="path2" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,2 @@
sample:
filter: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

View File

@@ -1,3 +1,66 @@
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path d="M9.12541 0.116L0.66541 5L9.12541 9.884V0.116ZM8.32141 8.504L2.29741 5L8.32141 1.496V8.504Z" fill="#7B7E9E"/> <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="12"
height="14"
viewBox="0 0 12 14"
fill="none"
version="1.1"
id="svg4"
sodipodi:docname="left_arrow.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\Users\Pieter-Jan Briers\Projects\space-station-14\Resources\Textures\Interface\Nano\left_arrow.svg.192dpi.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192">
<metadata
id="metadata10">
<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>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1051"
id="namedview6"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:bbox-paths="false"
inkscape:bbox-nodes="true"
inkscape:snap-object-midpoints="false"
inkscape:snap-nodes="false"
inkscape:snap-page="true"
inkscape:zoom="44"
inkscape:cx="5.9187161"
inkscape:cy="7.8912724"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M 12,0.072341 0,6.9999997 12,13.927659 Z M 10.859575,11.970212 2.3148933,6.9999997 10.859575,2.0297877 Z"
fill="#7b7e9e"
id="path2"
style="stroke-width:1.41844" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

@@ -0,0 +1,2 @@
sample:
filter: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

View File

@@ -0,0 +1,2 @@
sample:
filter: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

View File

@@ -0,0 +1,2 @@
sample:
filter: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

View File

@@ -1,3 +1,69 @@
<svg width="9" height="10" viewBox="0 0 9 10" fill="none" xmlns="http://www.w3.org/2000/svg"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<path d="M8.58 5L0.12 0.116V9.884L8.58 5ZM6.948 5L0.924 8.504V1.496L6.948 5Z" fill="#7B7E9E"/> <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="12"
height="14"
viewBox="0 0 12 14"
fill="none"
version="1.1"
id="svg4"
sodipodi:docname="right_arrow.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\Users\Pieter-Jan Briers\Projects\space-station-14\Resources\Textures\Interface\Nano\right_arrow.svg.192dpi.png"
inkscape:export-xdpi="193.91678"
inkscape:export-ydpi="193.91678">
<metadata
id="metadata10">
<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>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1051"
id="namedview6"
showgrid="false"
scale-x="1"
viewbox-width="11"
viewbox-height="11.5"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="43.999999"
inkscape:cx="9.3222643"
inkscape:cy="6.5346476"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4"
inkscape:document-rotation="0"
inkscape:snap-page="true" />
<path
d="M 12,7.0000003 0,0.07234076 V 13.927659 Z m -2.3148935,0 -8.544681,4.9702107 V 2.0297876 Z"
fill="#7b7e9e"
id="path2"
style="stroke-width:1.41843" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

View File

@@ -0,0 +1,2 @@
sample:
filter: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B