add enum icon

This commit is contained in:
Matt Parker
2025-10-27 21:55:03 +10:00
parent 9c4ccd5fec
commit 935f2d9753
3 changed files with 124 additions and 1 deletions

View File

@@ -14,8 +14,8 @@ public partial class SharpIdeCodeEdit
private readonly Texture2D _keywordIcon = ResourceLoader.Load<Texture2D>("uid://b0ujhoq2xg2v0");
private readonly Texture2D _namespaceIcon = ResourceLoader.Load<Texture2D>("uid://bob5blfjll4h3");
private readonly Texture2D _eventIcon = ResourceLoader.Load<Texture2D>("uid://c3upo3lxmgtls");
private readonly Texture2D _enumIcon = ResourceLoader.Load<Texture2D>("uid://8mdxo65qepqv");
// delegate
// enum
private Texture2D? GetIconForCompletion(SymbolKind? symbolKind, TypeKind? typeKind, Accessibility? accessibility, bool isKeyword)
{
@@ -24,6 +24,7 @@ public partial class SharpIdeCodeEdit
{
(SymbolKind.Method, _, _) => _csharpMethodIcon,
(_, TypeKind.Interface, _) => _csharpInterfaceIcon,
(_, TypeKind.Enum, _) => _enumIcon,
(SymbolKind.NamedType, _, _) => _csharpClassIcon,
(SymbolKind.Local, _, _) => _localVariableIcon,
(SymbolKind.Field, _, _) => _fieldIcon,

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
height="800px"
width="800px"
version="1.1"
id="Capa_1"
viewBox="0 0 525.325 525.325"
xml:space="preserve"
sodipodi:docname="enum-icon.svg"
inkscape:version="1.4.2 (f4327f4, 2025-05-13)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1"><rect
x="160.93193"
y="352.88689"
width="989.26245"
height="823.56879"
id="rect1" /></defs><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="0.3646875"
inkscape:cx="-973.43617"
inkscape:cy="226.22108"
inkscape:window-width="2560"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
<g
id="g1"
transform="matrix(1.0007541,0,0,0.96334492,-0.19807395,9.6729914)">
<g
id="g3"
transform="matrix(1.1480486,0,0,1.1926304,367.18346,-80.847781)"><rect
style="fill:#3d3223;stroke:#b9964e;stroke-width:32.8328;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;paint-order:normal"
id="rect2-8"
width="301.60049"
height="234.97827"
x="-193.05695"
y="102.43837"
ry="0.057294738" /><path
style="fill:#3d3223;stroke:#b9964e;stroke-width:32.8328;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="M -135.88789,179.86416 H 51.37449"
id="path2-8"
sodipodi:nodetypes="cc" /><path
style="fill:#3d3223;stroke:#b9964e;stroke-width:32.8328;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="M -135.88789,258.25946 H 51.37449"
id="path2-7-2"
sodipodi:nodetypes="cc" /></g><g
id="g2"
transform="matrix(1.1480486,0,0,1.1926304,-15.825549,-46.966402)"><rect
style="fill:#3d3223;stroke:#b9964e;stroke-width:32.8328;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;paint-order:normal"
id="rect2"
width="301.60049"
height="234.97827"
x="42.989307"
y="210.15082"
ry="0.057294738" /><path
style="fill:#3d3223;stroke:#b9964e;stroke-width:32.8328;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="M 100.15837,287.57661 H 287.42075"
id="path2"
sodipodi:nodetypes="cc" /><path
style="fill:#3d3223;stroke:#b9964e;stroke-width:32.8328;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="M 100.15837,365.97191 H 287.42075"
id="path2-7"
sodipodi:nodetypes="cc" /></g></g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8mdxo65qepqv"
path="res://.godot/imported/enum-icon.svg-ff57c384a88b5882f7415f6aa17c341e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Features/Completions/Resources/enum-icon.svg"
dest_files=["res://.godot/imported/enum-icon.svg-ff57c384a88b5882f7415f6aa17c341e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=0.1
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false