From 5415a510a833a00384e5bdcb6cc3512ef473818e Mon Sep 17 00:00:00 2001 From: Cart Date: Fri, 12 Jan 2024 23:11:32 -0500 Subject: [PATCH] Remove Placeholder, add texture to clock, make clock AM/PM, Recentre clock, make font closer to clock, resize font for AM/PM --- Assets/Scenes/Main.unity | 59 +++++++++---------------------------- Assets/Scripts/UIHandler.cs | 14 ++------- 2 files changed, 16 insertions(+), 57 deletions(-) diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 78e14748..66bdd898 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -8681,7 +8681,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 10 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 92.154, z: 0} --- !u!1 &898284999 GameObject: @@ -14025,7 +14025,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: d7a5b8fa86e452749a847273c357fde9, type: 2} + - {fileID: 2100000, guid: 1f274abfccaef664ea3aa0e421c195cc, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -14062,15 +14062,15 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1302464759} - m_LocalRotation: {x: 0.7071068, y: 0.7071068, z: 0, w: 0} - m_LocalPosition: {x: -26.571, y: 5.093, z: 0.96} + m_LocalRotation: {x: 0.5000001, y: 0.49999994, z: -0.49999994, w: 0.5000001} + m_LocalPosition: {x: -26.579, y: 5.175, z: 0.958} m_LocalScale: {x: 0.19883305, y: 0.19883305, z: 0.19883305} m_ConstrainProportionsScale: 1 m_Children: - {fileID: 1743648932} m_Father: {fileID: 0} - m_RootOrder: 8 - m_LocalEulerAnglesHint: {x: 0, y: 180, z: 90} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 90, y: 180.001, z: 90.001} --- !u!1 &1306787902 GameObject: m_ObjectHideFlags: 0 @@ -17210,37 +17210,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1599140475} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1615758372 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1615758373} - m_Layer: 0 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1615758373 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1615758372} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 75.79938, y: -55.972134, z: -25.16473} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1660780197 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 2632791496535126926, guid: e138ae89ca85efe49841d37215dbeb6f, @@ -23174,17 +23143,17 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1977450308} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.58} + m_LocalRotation: {x: 0, y: -0, z: 0.7071068, w: -0.7071068} + m_LocalPosition: {x: 0, y: 0, z: -0.05} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1743648932} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 270} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -0.81, y: -0} + m_AnchoredPosition: {x: -0.81, y: 0} m_SizeDelta: {x: 11.675, y: 2.919} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1977450310 @@ -23207,7 +23176,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 12:00 + m_text: 12:00 PM m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -23234,8 +23203,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 2.25 - m_fontSizeBase: 2.25 + m_fontSize: 2 + m_fontSizeBase: 2 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -24719,7 +24688,7 @@ Transform: m_Children: - {fileID: 1815324618} m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &2048128762 GameObject: diff --git a/Assets/Scripts/UIHandler.cs b/Assets/Scripts/UIHandler.cs index e1ecf2ed..21a2bd92 100644 --- a/Assets/Scripts/UIHandler.cs +++ b/Assets/Scripts/UIHandler.cs @@ -24,18 +24,8 @@ void Start() void Update() { - if (System.DateTime.Now.Minute.ToString().Length == 1) - { - string hour = System.DateTime.Now.Hour.ToString(); - string minute = System.DateTime.Now.Minute.ToString().Insert(0, "0"); - minuteHourText.text = hour + ":" + minute; - } - else - { - string hour = System.DateTime.Now.Hour.ToString(); - string minute = System.DateTime.Now.Minute.ToString(); - minuteHourText.text = hour + ":" + minute; - } + string time = System.DateTime.Now.ToString("hh:mm tt"); + minuteHourText.text = time; } public static async Task GetTexturePlusName(RawImage pfpHolder, TextMeshProUGUI profileNameHolder)