add namespace icon

This commit is contained in:
Matt Parker
2025-10-27 21:45:22 +10:00
parent 88ad3f69d7
commit 77160b6002
3 changed files with 95 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ public partial class SharpIdeCodeEdit
private readonly Texture2D _fieldIcon = ResourceLoader.Load<Texture2D>("uid://c4y7d5m4upfju");
private readonly Texture2D _propertyIcon = ResourceLoader.Load<Texture2D>("uid://y5pwrwwrjqmc");
private readonly Texture2D _keywordIcon = ResourceLoader.Load<Texture2D>("uid://b0ujhoq2xg2v0");
// namespace
private readonly Texture2D _namespaceIcon = ResourceLoader.Load<Texture2D>("uid://bob5blfjll4h3");
private Texture2D? GetIconForCompletion(SymbolKind? symbolKind, TypeKind? typeKind, Accessibility? accessibility, bool isKeyword)
{
@@ -25,6 +25,7 @@ public partial class SharpIdeCodeEdit
(SymbolKind.Local, _, _) => _localVariableIcon,
(SymbolKind.Field, _, _) => _fieldIcon,
(SymbolKind.Property, _, _) => _propertyIcon,
(SymbolKind.Namespace, _, _) => _namespaceIcon,
_ => null
};
return texture;