Skip to content

Commit 39a5e85

Browse files
committed
feat: add PostGameUICanvas UI toolkit prefab plus its related uxml and uss files
1 parent 282324f commit 39a5e85

File tree

7 files changed

+144
-12
lines changed

7 files changed

+144
-12
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1 &1443245446169138580
4+
GameObject:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
serializedVersion: 6
10+
m_Component:
11+
- component: {fileID: 7855837178462082302}
12+
- component: {fileID: 2063287831439623020}
13+
m_Layer: 5
14+
m_Name: PostGameUICanvasToolkit
15+
m_TagString: Untagged
16+
m_Icon: {fileID: 0}
17+
m_NavMeshLayer: 0
18+
m_StaticEditorFlags: 0
19+
m_IsActive: 1
20+
--- !u!4 &7855837178462082302
21+
Transform:
22+
m_ObjectHideFlags: 0
23+
m_CorrespondingSourceObject: {fileID: 0}
24+
m_PrefabInstance: {fileID: 0}
25+
m_PrefabAsset: {fileID: 0}
26+
m_GameObject: {fileID: 1443245446169138580}
27+
serializedVersion: 2
28+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
29+
m_LocalPosition: {x: 0, y: 0, z: 0}
30+
m_LocalScale: {x: 1, y: 1, z: 1}
31+
m_ConstrainProportionsScale: 0
32+
m_Children: []
33+
m_Father: {fileID: 0}
34+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35+
--- !u!114 &2063287831439623020
36+
MonoBehaviour:
37+
m_ObjectHideFlags: 0
38+
m_CorrespondingSourceObject: {fileID: 0}
39+
m_PrefabInstance: {fileID: 0}
40+
m_PrefabAsset: {fileID: 0}
41+
m_GameObject: {fileID: 1443245446169138580}
42+
m_Enabled: 1
43+
m_EditorHideFlags: 0
44+
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
45+
m_Name:
46+
m_EditorClassIdentifier:
47+
m_PanelSettings: {fileID: 11400000, guid: 30704bc49d34869449e8bfdb3ab57841, type: 2}
48+
m_ParentUI: {fileID: 0}
49+
sourceAsset: {fileID: 9197481963319205126, guid: 46f2fde397ae13e40a9794dab57d98a1, type: 3}
50+
m_SortingOrder: 0
51+
m_WorldSpaceSizeMode: 1
52+
m_WorldSpaceWidth: 1920
53+
m_WorldSpaceHeight: 1080

Assets/Prefabs/UI/UIToolkit/PostGameUICanvasToolkit.prefab.meta

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

Assets/Prefabs/UI/UIToolkit/USS/GeneralUI.uss

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
.menuButton {
2-
background-image: url("project://database/Assets/Textures/UI/ui_btn_blank.png?fileID=2800000&guid=41948b4cc6087644b983dce55b466d50&type=3#ui_btn_blank");
3-
background-size: 435px 75px;
4-
-unity-font-definition: url("project://database/Assets/TextMesh%20Pro/Fonts/Bungee-Regular.ttf?fileID=12800000&guid=b8a509d3b3ce60847bbafb5a38462ecf&type=3#Bungee-Regular");
5-
color: rgb(247, 213, 32);
6-
width: 320px;
7-
height: 65px;
8-
align-self: center;
9-
font-size: 44px;
10-
margin-top: 10px;
11-
}
12-
131
.menuButton:hover {
142
background-image: url("project://database/Assets/Textures/UI/ui_btn_blank.png?fileID=2800000&guid=41948b4cc6087644b983dce55b466d50&type=3#ui_btn_blank");
153
background-size: 435px 75px;
@@ -46,3 +34,28 @@
4634
border-left-width: 0;
4735
background-color: rgba(0, 0, 0, 0);
4836
}
37+
38+
.gameText {
39+
color: rgb(129, 255, 47);
40+
font-size: 115px;
41+
position: absolute;
42+
-unity-text-outline-width: 10px;
43+
-unity-font-definition: url("project://database/Assets/TextMesh%20Pro/Fonts/Bungee-Regular.ttf?fileID=12800000&guid=b8a509d3b3ce60847bbafb5a38462ecf&type=3#Bungee-Regular");
44+
-unity-text-outline-color: rgb(0, 0, 0);
45+
top: 39%;
46+
left: 23%;
47+
}
48+
49+
.menuButton {
50+
background-image: url("project://database/Assets/Textures/UI/ui_btn_blank.png?fileID=2800000&guid=41948b4cc6087644b983dce55b466d50&type=3#ui_btn_blank");
51+
-unity-font-definition: url("project://database/Assets/TextMesh%20Pro/Fonts/Bungee-Regular.ttf?fileID=12800000&guid=b8a509d3b3ce60847bbafb5a38462ecf&type=3#Bungee-Regular");
52+
color: rgb(247, 213, 32);
53+
font-size: 190%;
54+
background-color: rgba(0, 0, 0, 0);
55+
border-top-width: 0;
56+
border-right-width: 0;
57+
border-bottom-width: 0;
58+
border-left-width: 0;
59+
width: 408px;
60+
height: 90px;
61+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.message-feed {
2+
width: 480%;
3+
height: 250px;
4+
border-radius: 5px;
5+
border: solid 1px rgb(204, 204, 204);
6+
overflow: auto;
7+
padding: 10px;
8+
position: absolute;
9+
left: 64px;
10+
top: 500px;
11+
}
12+
13+
.message-item {
14+
font-size: 14px;
15+
color: rgb(51, 51, 51);
16+
padding: 8px;
17+
margin-bottom: 8px;
18+
border-radius: 4px;
19+
word-wrap: break-word;
20+
width: 480px;
21+
height: 50px;
22+
position: absolute;
23+
top: 500px;
24+
left: 64px;
25+
}

Assets/Prefabs/UI/UIToolkit/USS/MessageFeed.uss.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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<engine:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:engine="UnityEngine.UIElements" xmlns:editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
2+
<Style src="project://database/Assets/Prefabs/UI/UIToolkit/USS/GeneralUI.uss?fileID=7433441132597879392&amp;guid=36bef7d47f6ca284f8a33439946d6dfe&amp;type=3#GeneralUI" />
3+
<Style src="project://database/Assets/Prefabs/UI/UIToolkit/USS/MessageFeed.uss?fileID=7433441132597879392&amp;guid=daa8504d262853748b8d7c2a377261a3&amp;type=3#MessageFeed" />
4+
<engine:VisualElement name="root" style="flex-grow: 1; flex-shrink: 5;">
5+
<engine:Label name="title" style="background-image: url(&quot;project://database/Assets/Textures/UI/ui_title_logo.png?fileID=2800000&amp;guid=240734f1e1c8daa4b9bd0593e767fb3f&amp;type=3#ui_title_logo&quot;); width: 50%; height: 50%; -unity-text-align: upper-center; justify-content: center; align-items: center; top: -2%; left: 25%;" />
6+
<engine:Label text="YOU WON!" name="gameWinText" class="gameText" />
7+
<engine:Label text="Try Again" name="gameLostText" class="gameText" style="color: rgb(245, 90, 22);" />
8+
<engine:Button text="Play Again" name="playAgainBtn" class="menuButton" style="position: absolute; top: 60%; left: 32%;" />
9+
<engine:Button text="return to menu" name="menuBtn" class="menuButton" style="left: 32%; top: 75%; position: absolute;" />
10+
<engine:Button text="Waiting on host &#10;to play again" name="waitOnHostBtn" class="menuButton" style="position: absolute; top: 60%; left: 32%;" />
11+
</engine:VisualElement>
12+
<engine:ScrollView name="messageFeed" class="message-feed message-item" />
13+
</engine:UXML>

Assets/Prefabs/UI/UIToolkit/UXML/PostGameUICanvas.uxml.meta

Lines changed: 10 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)