Skip to content

Commit 4e2aa7e

Browse files
committed
added package
1 parent 2370bc0 commit 4e2aa7e

File tree

794 files changed

+33690
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

794 files changed

+33690
-0
lines changed

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"visualstudiotoolsforunity.vstuc"
4+
]
5+
}

.vscode/launch.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to Unity",
6+
"type": "vstuc",
7+
"request": "attach"
8+
}
9+
]
10+
}

.vscode/settings.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"files.exclude": {
3+
"**/.DS_Store": true,
4+
"**/.git": true,
5+
"**/.gitmodules": true,
6+
"**/*.booproj": true,
7+
"**/*.pidb": true,
8+
"**/*.suo": true,
9+
"**/*.user": true,
10+
"**/*.userprefs": true,
11+
"**/*.unityproj": true,
12+
"**/*.dll": true,
13+
"**/*.exe": true,
14+
"**/*.pdf": true,
15+
"**/*.mid": true,
16+
"**/*.midi": true,
17+
"**/*.wav": true,
18+
"**/*.gif": true,
19+
"**/*.ico": true,
20+
"**/*.jpg": true,
21+
"**/*.jpeg": true,
22+
"**/*.png": true,
23+
"**/*.psd": true,
24+
"**/*.tga": true,
25+
"**/*.tif": true,
26+
"**/*.tiff": true,
27+
"**/*.3ds": true,
28+
"**/*.3DS": true,
29+
"**/*.fbx": true,
30+
"**/*.FBX": true,
31+
"**/*.lxo": true,
32+
"**/*.LXO": true,
33+
"**/*.ma": true,
34+
"**/*.MA": true,
35+
"**/*.obj": true,
36+
"**/*.OBJ": true,
37+
"**/*.asset": true,
38+
"**/*.cubemap": true,
39+
"**/*.flare": true,
40+
"**/*.mat": true,
41+
"**/*.meta": true,
42+
"**/*.prefab": true,
43+
"**/*.unity": true,
44+
"build/": true,
45+
"Build/": true,
46+
"Library/": true,
47+
"library/": true,
48+
"obj/": true,
49+
"Obj/": true,
50+
"ProjectSettings/": true,
51+
"temp/": true,
52+
"Temp/": true
53+
},
54+
"dotnet.defaultSolution": "UI Toolkit Icon Component.sln"
55+
}

Assets/UI Toolkit Icon Component.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@import url("unity-theme://default");
2+
3+
.icon {
4+
margin-top: 0;
5+
margin-right: 0;
6+
margin-bottom: 0;
7+
margin-left: 0;
8+
9+
padding-top: 0;
10+
padding-right: 0;
11+
padding-bottom: 0;
12+
padding-left: 0;
13+
}
14+
15+
.material-icon__outlined {
16+
-unity-font-definition: url("project://database/Assets/UI Toolkit Icon Component/IconFonts/Material_Symbols_Outlined/MaterialSymbolsOutlined-VariableFont_FILL,GRAD,opsz,wght.ttf?fileID=12800000&guid=8cfa67d5e6533dd4a9c1f06e2dbe5e33&type=3#MaterialSymbolsOutlined-VariableFont_FILL,GRAD,opsz,wght");
17+
}
18+
19+
.material-icon__rounded {
20+
-unity-font-definition: url("project://database/Assets/UI Toolkit Icon Component/IconFonts/Material_Symbols_Rounded/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.ttf?fileID=12800000&guid=ccbf84e2b2aae134db85493ec7518255&type=3#MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght");
21+
}
22+
23+
.material-icon__sharp {
24+
-unity-font-definition: url("project://database/Assets/UI Toolkit Icon Component/IconFonts/Material_Symbols_Sharp/MaterialSymbolsSharp-VariableFont_FILL,GRAD,opsz,wght.ttf?fileID=12800000&guid=0616d0098491e7843b7c8655f626dddf&type=3#MaterialSymbolsSharp-VariableFont_FILL,GRAD,opsz,wght");
25+
}

Assets/UI Toolkit Icon Component/DefaultGlobalTheme.tss.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using Unity.Properties;
2+
using UnityEngine.UIElements;
3+
4+
namespace UIToolkitIconComponent {
5+
[UxmlElement]
6+
public partial class Icon : Label {
7+
8+
private readonly string[] iconStyleClasses = new[] {
9+
"material-icon__outlined",
10+
"material-icon__rounded",
11+
"material-icon__sharp",
12+
};
13+
14+
15+
public enum IconStyleEnum {
16+
Outlined = 0,
17+
Rounded = 1,
18+
Sharp = 2,
19+
}
20+
21+
22+
private IconStyleEnum _iconStyle;
23+
24+
[UxmlAttribute, CreateProperty]
25+
public IconStyleEnum IconStyle {
26+
get => _iconStyle;
27+
set {
28+
RemoveFromClassList(
29+
iconStyleClasses[(int) _iconStyle]
30+
);
31+
32+
AddToClassList(
33+
iconStyleClasses[(int) value]
34+
);
35+
36+
_iconStyle = value;
37+
}
38+
}
39+
40+
private string _iconCode;
41+
42+
[UxmlAttribute, CreateProperty]
43+
public string IconCode {
44+
get => _iconCode;
45+
set {
46+
_iconCode = value;
47+
48+
text = $"\\u{_iconCode}";
49+
}
50+
}
51+
52+
53+
public Icon() {
54+
IconStyle = IconStyleEnum.Rounded;
55+
56+
AddToClassList(
57+
"icon"
58+
);
59+
}
60+
}
61+
}

Assets/UI Toolkit Icon Component/Icon.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/UI Toolkit Icon Component/IconFonts.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/UI Toolkit Icon Component/IconFonts/Material_Symbols_Outlined.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)