From 66f9d3b3323475b09618733ca6bcb2db67622cd4 Mon Sep 17 00:00:00 2001 From: Mark Joshwel Date: Tue, 19 Nov 2024 11:26:23 +0800 Subject: [PATCH] game: add LeaderboardEntry.uxml following https://docs.unity3d.com/2022.3/Documentation/Manual/UIE-HowTo-CreateRuntimeUI.html --- ColourMeOKGame/Assets/UI/GameUI.uss | 29 +++++++++++++++++++ ColourMeOKGame/Assets/UI/GameUI.uxml | 18 ++++++++++-- .../Assets/UI/LeaderboardEntry.uxml | 8 +++++ .../Assets/UI/LeaderboardEntry.uxml.meta | 3 ++ 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 ColourMeOKGame/Assets/UI/LeaderboardEntry.uxml create mode 100644 ColourMeOKGame/Assets/UI/LeaderboardEntry.uxml.meta diff --git a/ColourMeOKGame/Assets/UI/GameUI.uss b/ColourMeOKGame/Assets/UI/GameUI.uss index f534f4a..791e902 100644 --- a/ColourMeOKGame/Assets/UI/GameUI.uss +++ b/ColourMeOKGame/Assets/UI/GameUI.uss @@ -124,3 +124,32 @@ #AccountButtons > Button { padding: 0; margin: 0; } + +#LeaderboardEntry Label, +#LeaderboardEntryReference Label, +#LeaderboardEntryHeader Label +{ + margin: 0; + padding: 0; + font-size: 26px; +} + +#LeaderboardEntry, +#LeaderboardEntryReference, +#LeaderboardEntryHeader { + padding-top: 1.15%; + padding-bottom: 1.15%; + border-left-color: rgb(15, 13, 27); + border-right-color: rgb(15, 13, 27); + border-top-color: rgb(15, 13, 27); + border-bottom-color: rgb(15, 13, 27); + border-bottom-width: 1px; + flex-direction: row; + flex-shrink: 0; + flex-grow: 0; +} + +#LeaderboardEntryHeader +{ + border-top-width: 1px; +} diff --git a/ColourMeOKGame/Assets/UI/GameUI.uxml b/ColourMeOKGame/Assets/UI/GameUI.uxml index 88b625e..00cc0cd 100644 --- a/ColourMeOKGame/Assets/UI/GameUI.uxml +++ b/ColourMeOKGame/Assets/UI/GameUI.uxml @@ -106,11 +106,23 @@ - + - + + + + + + + + + + + + + - + diff --git a/ColourMeOKGame/Assets/UI/LeaderboardEntry.uxml b/ColourMeOKGame/Assets/UI/LeaderboardEntry.uxml new file mode 100644 index 0000000..a4f3ac7 --- /dev/null +++ b/ColourMeOKGame/Assets/UI/LeaderboardEntry.uxml @@ -0,0 +1,8 @@ + +